1GLXSWAPBUFFERS()                                              GLXSWAPBUFFERS()
2
3
4

NAME

6       glXSwapBuffers - exchange front and back buffers
7
8

C SPECIFICATION

10       void glXSwapBuffers( Display *dpy,
11                            GLXDrawable drawable )
12
13       delim $$
14

PARAMETERS

16       dpy       Specifies the connection to the X server.
17
18       drawable  Specifies the drawable whose buffers are to be swapped.
19

DESCRIPTION

21       glXSwapBuffers  promotes the contents of the back buffer of drawable to
22       become the contents of the front buffer of drawable.  The  contents  of
23       the  back  buffer  then  become  undefined.  The update typically takes
24       place during the vertical retrace of the monitor, rather  than  immedi‐
25       ately after glXSwapBuffers is called.
26
27       glXSwapBuffers  performs an implicit glFlush before it returns.  Subse‐
28       quent OpenGL commands may be issued immediately after calling  glXSwap‐
29       Buffers, but are not executed until the buffer exchange is completed.
30
31       If  drawable  was not created with respect to a double-buffered visual,
32       glXSwapBuffers has no effect, and no error is generated.
33

NOTES

35       The contents of the back buffer become undefined  after  a  swap.  Note
36       that this applies to pbuffers as well as windows.
37
38       All  GLX  rendering  contexts  share the same notion of which are front
39       buffers and which are back buffers.  One consequence is that when  mul‐
40       tiple  clients are rendering to the same double-buffered window, all of
41       them should finish rendering before one of them issues the  command  to
42       swap  buffers.   The clients are responsible for implementing this syn‐
43       chronization.  Typically this is accomplished by executing glFinish and
44       then using a semaphore in shared memory to rendezvous before swapping.
45

ERRORS

47       GLXBadDrawable is generated if drawable is not a valid GLX drawable.
48
49       GLXBadCurrentWindow  is  generated if dpy and drawable are respectively
50       the display and drawable associated with the  current  context  of  the
51       calling  thread,  and  drawable  identifies  a window that is no longer
52       valid.
53

SEE ALSO

55       glFlush,  glXBindSwapBarrierSGIX,  glXJoinSwapGroupSGIX,  glXSwapInter‐
56       valSGI
57
58
59
60
61                                                              GLXSWAPBUFFERS()
Impressum