Stencil and Accumulation buffers quering

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?



Thanks a lot!
It seems that my video-card (S3 Savage4) doesn’t support such a buffers
That’s the result from glGet*():
Color buffer bits: ®8 (G)8 (B)8 (A)0 (Index)32
Accumulation buffers count: 0
Accumulation buffer bits: ®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?

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.)

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.

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

Specifies the total number of bitplanes in the accumulation buffer.

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

Specifies the depth of the stencil buffer.

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

Now it’s all clear to me.