Makes the back buffer visible.
OpenGL C bindings library: libGL.a
void glXSwapBuffers(Display *dpy GLXDrawable Drawable)
The glXSwapBuffers subroutine promotes the contents of the back buffer of Drawable to become the contents of the front buffer of Drawable. The contents of the back buffer then become undefined. The update typically takes place during the vertical retrace of the monitor, rather than immediately after glXSwapBuffers is called. All GLX rendering contexts share the same notion of which are front buffers and which are back buffers.
An implicit glFlush subroutine is performed by the glXSwapBuffers subroutine before it returns. Subsequent OpenGL commands can be issued immediately after calling glXSwapBuffers, but these commands are not executed until the buffer exchange is complete.
If the window specified by the Drawable parameter was not created with respect to a double-buffered visual, the glXSwapBuffers subroutine has no effect and no error is generated.
dpy | Specifies the connection to the X server. |
Drawable | Specifies the window whose buffers are to be swapped. |
Synchronization between multiple GLX contexts that render to the same double-buffered window is the responsibility of the client. The X Synchronization Extension can be used to facilitate this cooperation.
/usr/include/GL/gl.h | Contains C language constants, variable type definitions, and ANSI function prototypes for OpenGL. |
The glFlush subroutine.
OpenGL in the AIXwindows (GLX) Environment.