Stencil Buffer

I am developing on a GF2 MX using Win2k. I am trying to create reflections using the stencil buffer. When I create my pfd, I tell it I want 16 bits for the stencil buffer. (I think I only need 2.) I am using display lists for my objects.

My question is this: Does the GF2 MX support stenciling in hardware?

It looks to me as if I am thrown into software mode. I see the polygon edges of all the reflected objects.

Any suggestions would be appreciated.

the stencil buffer is supported, but not 16 bits. only 8 bits. you should check all the available pixel formats just to be sure.

I found what may be the answer through a search of the forums. Here is what I found.

DFrey Frequent Contributor
posted 08-31-2000 06:33 PM

No Gorg, I’m pretty sure I have it right concerning NVidia cards. When ever the color buffer is 32 bits, the stencil buffer is accelerated because the depth buffer goes up to 24 bits and the remaining 8 bits is used for the stencil buffer. But when using a 16 bit color mode, the depth buffer also falls back to 16 bits, and there are no bits available for the stencil buffer. So in 16 bit color mode, the OpenGL driver resorts to using a software stencil buffer. In every program I’ve made and have used, this has been the case. Try turning on stencil buffer shadows in Quake 3 on a geforce in 16 bit color mode. Then turn them on in 32 bit color mode. You will see this quirk of the NVIDIA cards is all too real.

[This message has been edited by DFrey (edited 08-31-2000).]