The format you request is not always the format you get. To see what you really end up getting with your pixel format, you need to use DescribePixelFormat. And also, since the stencil buffer is a core component of OpenGL, you should expect some level of support to be emulated in the absence of hardware support. So try using DescribePixelFormat on the pixel format you select and look at the number of stencil bits then. I bet it will not be 0.
You have a GeForce 2, and I notice that you are trying to get a 64bit accum buffer. Those things are not supported in hardware so you should just set those to 0. It’s kind of silly to even try to use the thing on vid cards like these, unless you just wanted to learn it for whatever purpose.
I didn’t post the pixel format I request, but the pixel format I got ! (see the first post, it’s not a copy of C/C++ code).
My request for PixelFormat depends of the current display mode (16/32 bits) and if it returns a GENERIC_ACCELERATED, I change some parameters to get an accelerated format.
try using DescribePixelFormat on the pixel format you select and look at the number of stencil bits then. I bet it will not be 0.
The pixel format I posted is the result of the DescribePixelFormat, and stencil bits is 0.
You have a GeForce 2, and I notice that you are trying to get a 64bit accum buffer. Those things are not supported in hardware so you should just set those to 0.
I didn’t request it, but all pixel format have 64bit accum buffer !
[This message has been edited by opla (edited 07-10-2002).]
Originally posted by SirKnight:
[b]You have a GeForce 2, and I notice that you are trying to get a 64bit accum buffer. Those things are not supported in hardware so you should just set those to 0. It’s kind of silly to even try to use the thing on vid cards like these, unless you just wanted to learn it for whatever purpose.
-SirKnight[/b]
I beleive that even if you don’t ask for it, you get it. I’m not sure why. Perhaps there is plenty of RAM in our PCs.
Don’t worry, memory is not reserved for the accum until you make some accum related calls.
Opla… you should anyway always do your stencil functions in a pbuffer if anyway possible, because else the fillrate meight later “kill” you. If you use it for stencil shadows, that will in any case be far faster.