PDA

View Full Version : Stencil and Accumulation buffers quering



Scorpion
03-23-2001, 08:58 AM
How can I query if Stencil and/or Accumulation buffers are supported by a OpenGL implementation?
And how to find how many bits is every element there?

Nocturnal
03-23-2001, 02:18 PM
glGet(...)

specifically,
GL_AUX_BUFFERS
GL_STENCIL_BITS
GL_*COLOR*_BITS

Scorpion
03-24-2001, 12:11 AM
Thanks a lot!
It seems that my video-card (S3 Savage4) doesn't support such a buffers http://www.opengl.org/discussion_boards/ubb/frown.gif
That's the result from glGet*():
Color buffer bits: (R)8 (G)8 (B)8 (A)0 (Index)32
Accumulation buffers count: 0
Accumulation buffer bits: (R)0 (G)0 (B)0 (A)0
Depth buffer bits: 16 Stencil buffer bits: 0

Or there is some way to enable these buffers?
In GLUT there is some flags to glutInitDisplayMode() used to enable Accumulation and Stencil buffers. But how can I do that without GLUT?

Deiussum
03-24-2001, 05:43 AM
From MSDN documentation on the PIXELFORMATDESCRIPTOR struct: (If you're not using Glut, you should recoginize this struct as the one used with Choose/Describe/Set PixelFormat.)



cColorBits
Specifies the number of color bitplanes in each color buffer. For RGBA pixel types, it is the size of the color buffer, excluding the alpha bitplanes. For color-index pixels, it is the size of the color-index buffer.

cAlphaBits
Specifies the number of alpha bitplanes in each RGBA color buffer. Alpha bitplanes are not supported.

cAccumBits
Specifies the total number of bitplanes in the accumulation buffer.

cDepthBits
Specifies the depth of the depth (z-axis) buffer.

cStencilBits
Specifies the depth of the stencil buffer.



I just pulled out all members which are relevant to your question.

Scorpion
03-24-2001, 11:16 PM
Thanks!
Now it's all clear to me.