Next: 3.3 Overlays Up: 3 Advanced Xlib and Previous: 3.1 Colormaps

3.2 Double Buffering

If you are writing an animated 3D program, you will probably want double buffering. It is not always available for OpenGL. You have two choices: run in single-buffered mode or render to a pixmap and copy each new frame to the window using XCopyArea.

Note that when you use glXChooseVisual, booleans are matched exactly (integers if specified are considered minimums). This means if you want to support double buffering but be able to fall back to single buffering, two calls will be needed to glXChooseVisual. If an OpenGL application has sophisticated needs for selecting visuals, glXGetConfig can be called on each visual to determine the OpenGL attributes of each visual.


mjk@asd.sgi.com
Wed Oct 19 18:11:46 PDT 1994