1GLXMAKECURRENT()                                              GLXMAKECURRENT()
2
3
4

NAME

6       glXMakeCurrent - attach a GLX context to a window or a GLX pixmap
7
8

C SPECIFICATION

10       Bool glXMakeCurrent( Display *dpy,
11                            GLXDrawable drawable,
12                            GLXContext ctx )
13
14       delim $$
15

PARAMETERS

17       dpy       Specifies the connection to the X server.
18
19       drawable  Specifies a GLX drawable.  Must be either an X window ID or a
20                 GLX pixmap ID.
21
22       ctx       Specifies a GLX rendering context that is to be  attached  to
23                 drawable.
24

DESCRIPTION

26       glXMakeCurrent  does two things: It makes ctx the current GLX rendering
27       context of the calling thread, replacing the previously current context
28       if  there was one, and it attaches ctx to a GLX drawable, either a win‐
29       dow or a GLX pixmap.  As a result of these two actions,  subsequent  GL
30       rendering  calls use rendering context ctx to modify GLX drawable draw‐
31       able.  Because glXMakeCurrent always  replaces  the  current  rendering
32       context with ctx, there can be only one current context per thread.
33
34       Pending commands to the previous context, if any, are flushed before it
35       is released.
36
37       The first time ctx is made current to any thread, its viewport  is  set
38       to  the  full size of drawable.  Subsequent calls by any thread to glX‐
39       MakeCurrent with ctx have no effect on its viewport.
40
41       To release the current context without assigning a new one,  call  glX‐
42       MakeCurrent with drawable set None and ctx set to NULL
43
44       glXMakeCurrent  returns  True if it is successful, False otherwise.  If
45       False is returned, the previously current rendering context  and  draw‐
46       able (if any) remain unchanged.
47

NOTES

49       A  process  is  a single-execution environment, implemented in a single
50       address space, consisting of one or more threads.
51
52       A thread is one of a set of subprocesses that share  a  single  address
53       space,  but maintain separate program counters, stack spaces, and other
54       related global data.  A thread that is the only member of  its  subpro‐
55       cess group is equivalent to a process.
56

ERRORS

58       BadMatch  is  generated  if  drawable  was  not created with the same X
59       screen and visual as ctx.  It is also generated if drawable is None and
60       ctx is not NULL.
61
62       BadAccess is generated if ctx was current to another thread at the time
63       glXMakeCurrent was called.
64
65       GLXBadDrawable is generated if drawable is not a valid GLX drawable.
66
67       GLXBadContext is generated if ctx is not a valid GLX context.
68
69       GLXBadContextState is generated if glXMakeCurrent is  executed  between
70       the execution of glBegin and the corresponding execution of glEnd.
71
72       GLXBadContextState  is  also generated if the rendering context current
73       to the calling thread has GL renderer state GL_FEEDBACK or GL_SELECT.
74
75       GLXBadCurrentWindow is generated if there are pending GL  commands  for
76       the  previous  context  and the current drawable is a window that is no
77       longer valid.
78
79       BadAlloc may be generated if  the  server  has  delayed  allocation  of
80       ancillary  buffers until glXMakeCurrent is called, only to find that it
81       has insufficient resources to complete the allocation.
82

SEE ALSO

84       glXCreateContext, glXCreateGLXPixmap
85
86
87
88
89                                                              GLXMAKECURRENT()
Impressum