glutSwapBuffers

swaps the buffers of the current window if double buffered.

Signature

glutSwapBuffers( )-> void
glutSwapBuffers( )
glutSwapBuffers(  ) -> None

Description

Performs a buffer swap on the layer in use for the current window. Specifically, glutSwapBuffers promotes the contents of the back buffer of the layer in use of the current window to become the contents of the front buffer. 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 glutSwapBuffers is called.
An implicit glFlush is done by glutSwapBuffers before it returns. Subsequent OpenGL commands can be issued immediately after calling glutSwapBuffers , but are not executed until the buffer exchange is completed.
If the layer in use is not double buffered, glutSwapBuffers has no effect.

See Also

glutPostRedisplay glutDisplayFunc

Sample Code References

The following code samples have been found which appear to reference the functions described here. Take care that the code may be old, broken or not even use PyOpenGL.

glutSwapBuffers
OpenGLContext OpenGLContext/glutcontext.py Lines: 163
OpenGL-Demo PyOpenGL-Demo/NeHe/lesson11.py Lines: 130
OpenGL-Demo PyOpenGL-Demo/NeHe/lesson18.py Lines: 229
OpenGL-Demo PyOpenGL-Demo/NeHe/lesson6.py Lines: 170
OpenGL-Demo PyOpenGL-Demo/NeHe/lesson41.py Lines: 281
OpenGL-Demo PyOpenGL-Demo/NeHe/lesson16.py Lines: 153
OpenGL-Demo PyOpenGL-Demo/NeHe/lesson23.py Lines: 209
OpenGL-Demo PyOpenGL-Demo/NeHe/lesson5.py Lines: 182
OpenGL-Demo PyOpenGL-Demo/NeHe/lesson4.py Lines: 134
OpenGL-Demo PyOpenGL-Demo/NeHe/lesson26.py Lines: 197
OpenGL-Demo PyOpenGL-Demo/NeHe/lesson12.py Lines: 131
OpenGL-Demo PyOpenGL-Demo/NeHe/lesson3.py Lines: 109
OpenGL-Demo PyOpenGL-Demo/NeHe/lesson13.py Lines: 159
OpenGL-Demo PyOpenGL-Demo/NeHe/lesson1.py Lines: 82
OpenGL-Demo PyOpenGL-Demo/NeHe/lesson19.py Lines: 191
OpenGL-Demo PyOpenGL-Demo/NeHe/lesson42.py Lines: 348
OpenGL-Demo PyOpenGL-Demo/NeHe/lesson2.py Lines: 104
OpenGL-Demo PyOpenGL-Demo/NeHe/lesson6-multi.py Lines: 208
OpenGL-Demo PyOpenGL-Demo/NeHe/lesson45.py Lines: 445
OpenGL-Demo PyOpenGL-Demo/proesch/nurbs/nurbs.py Lines: 163
OpenGL-Demo PyOpenGL-Demo/da/dots.py Lines: 62
OpenGL-Demo PyOpenGL-Demo/GLE/texas.py Lines: 55
OpenGL-Demo PyOpenGL-Demo/GLE/helix.py Lines: 26
OpenGL-Demo PyOpenGL-Demo/GLE/cone.py Lines: 30
OpenGL-Demo PyOpenGL-Demo/GLUT/gears.py Lines: 164
OpenGL-Demo PyOpenGL-Demo/GLUT/shader_test.py Lines: 94
OpenGL-Demo PyOpenGL-Demo/GLUT/glutplane.py Lines: 92
OpenGL-Demo PyOpenGL-Demo/GLUT/molehill.py Lines: 47
OpenGL-Demo PyOpenGL-Demo/GLUT/tom/checker.py Lines: 86
OpenGL-Demo PyOpenGL-Demo/GLUT/tom/lorentz.py Lines: 93
OpenGL-Demo PyOpenGL-Demo/GLUT/tom/arraytest.py Lines: 71
OpenGL-Demo PyOpenGL-Demo/GLUT/tom/text.py Lines: 87
OpenGL-Demo PyOpenGL-Demo/GLUT/tom/cone.py Lines: 87
OpenGL-Demo PyOpenGL-Demo/redbook/double.py Lines: 73
OpenGL-Demo PyOpenGL-Demo/redbook/teapots.py Lines: 180
OpenGL-Demo py2exe-example/shader_test.py Lines: 95
{Artistic License} PymmLib pymmlib/applications/glutviewer.py Lines: 379
{LGPL} PyUI2 renderers/openglGlut.py Lines: 91
{LGPL} PyUI2 system/glutdevice.py Lines: 201
{LGPL} PyMT pymt/ui/window/win_glut.py Lines: 18, 75
{GPL3} OpenGL-Programmable 05-shader.py Lines: 233
{GPL3} OpenGL-Programmable 07-attrib.py Lines: 252
{GPL3} OpenGL-Programmable 03-array.py Lines: 148
{GPL3} OpenGL-Programmable 09-gles2.py Lines: 295
{GPL3} OpenGL-Programmable 06-perpixel.py Lines: 241
{GPL3} OpenGL-Programmable 10-gl3.2core.py Lines: 305
{GPL3} OpenGL-Programmable 02-displaylist.py Lines: 146
{GPL3} OpenGL-Programmable 04-vbo.py Lines: 167
{GPL3} OpenGL-Programmable 01-direct.py Lines: 137
{GPL3} OpenGL-Programmable 08-pbo.py Lines: 274