next up previous contents
Next: 16.5 Rendering Geometry Efficiently Up: 16.4 Tuning the Raster Previous: 16.4.3 Optimizing Texture Mapping

16.4.4 Clearing the Color and Depth Buffers Simultaneously

The most basic per-frame operations are clearing the color and depth buffers. On some systems, there are optimizations for common special cases of these operations.

Whenever you need to clear both the color and depth buffers, don't clear each buffer independently. Instead use glClearGL_COLOR_BUFFER_BIT|GL_DEPTH_BUFFER_BIT(GL_COLOR_BUFFER_BIT|GL_DEPTH_BUFFER_BIT)

Also, be sure to disable dithering before clearing.



David Blythe
Thu Jul 17 21:24:28 PDT 1997