An OpenGL system can manipulate the following buffers:
Color buffers: front-left, front-right, back-left, back-right, and any number of auxiliary color buffers
Depth buffer
Stencil buffer
Accumulation buffer
Your particular OpenGL implementation determines which buffers are available and how many bits per pixel each holds. Additionally, you can have multiple visuals, or window types, that have different buffers available. At a minimum, you're guaranteed to have one color buffer for use in RGBA mode with associated stencil, depth, and accumulation buffers that have color components of nonzero size, and one color buffer for use in color-index mode with associated depth and stencil buffers. Table 10-1 lists the parameters to use with glGetIntegerv() to query your OpenGL system about per-pixel buffer storage for a particular visual. If you're using the X Window System, you'll probably want to use glXGetConfig() to query your visuals; see Appendix D and the OpenGL Reference Manual for more information about this routine.
| Parameter | Meaning |
|---|---|
GL_RED_BITS, GL_GREEN_BITS, | Number of bits per R, G, B, or A component in the color buffers |
GL_DEPTH_BITS | Number of bits per pixel in the depth buffer |
GL_STENCIL_BITS | Number of bits per pixel in the stencil buffer |
GL_ACCUM_RED_BITS, | Number of bits per R, G, B, or A component in the accumulation buffer |
Color Buffers
Clearing Buffers
Selecting Color Buffers for Writing
Masking Buffers
OpenGL Programming Guide