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 Drawable was not created with respect to a double-buffered visual or GLX FBConfig, or if Drawable is a GLX pixmap, 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.
The glFlush subroutine.
OpenGL in the AIXwindows (GLX) Environment.