1GLXSWAPBUFFERS(3G)               OpenGL Manual              GLXSWAPBUFFERS(3G)
2
3
4

NAME

6       glXSwapBuffers - exchange front and back buffers
7

C SPECIFICATION

9       void glXSwapBuffers(Display * dpy, GLXDrawable drawable);
10

PARAMETERS

12       dpy
13           Specifies the connection to the X server.
14
15       drawable
16           Specifies the drawable whose buffers are to be swapped.
17

DESCRIPTION

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

NOTES

34       The contents of the back buffer become undefined after a swap. Note
35       that this applies to pixel buffers as well as windows.
36
37       All GLX rendering contexts share the same notion of which are front
38       buffers and which are back buffers. One consequence is that when
39       multiple clients are rendering to the same double-buffered window, all
40       of them should finish rendering before one of them issues the command
41       to swap buffers. The clients are responsible for implementing this
42       synchronization. Typically this is accomplished by executing glFinish()
43       and then using a semaphore in shared memory to rendezvous before
44       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()
56
58       Copyright © 1991-2006 Silicon Graphics, Inc. This document is licensed
59       under the SGI Free Software B License. For details, see
60       http://oss.sgi.com/projects/FreeB/.
61

AUTHORS

63       opengl.org
64
65
66
67opengl.org                        07/13/2018                GLXSWAPBUFFERS(3G)
Impressum