PDA

View Full Version : Stencil doesn't work on nVidia?



No6
09-11-2003, 02:44 AM
Hi,
recently I made some apps in Visual Basic using OpenGL (W95, S3Trio64). They worked fine, but now with new computer (WinXP and Asus V9520Magic (FX 5200)) I have found, that Stencil doesn't work properly. On this link http://www.sweb.cz/no6/Stencil_test.rar
(60kB) you can find source code with two screenshots from both computers. My friend has the same problem with the same configuration.
On ATI it works fine.
Is there problem in graphics card or in my code? I am using standard tutorials...
Thanks you for testing included .exe on you graphics cards and replying the result.
no6

09-11-2003, 11:56 AM
I didnt check your rar file but you must use a 32 bit color depth.

No6
09-11-2003, 07:42 PM
My old card supported 16 bit only and it worked fine... (but I thing it hadn't hardware support for OpenGL) Now I have tried both modes 16/32 bit without any effect.

No6
09-12-2003, 10:57 PM
Problem is solved!
In definition of PixelFormatDescriptor I must specify StencilBits !!!(pfd.cStencilBits = 1)
With this it works everywhere :-)

Jan
09-13-2003, 07:49 AM
You certainly want to use 8 stencil bits instead of 1. Maybe now you donīt need more, but 8 bits are usually for free, so go get them.

Jan.