PDA

View Full Version : Stencil Buffer



Ariel
07-07-2004, 05:24 AM
when i use the stencil buffer in 16bit depth, i have 9 fps but i am only drawing 500 polygons Why?

Relic
07-07-2004, 05:47 AM
Because you might have used a hardware which doesn't support stencil together with 16 bit depth and fell back to a software rendering algorithm in the driver.
Don't use 16 bit depth then. Check if you can get 24 bit depth and 8 bit stencil in HighColor.
If not, use true color.

harsman
07-07-2004, 05:47 AM
Many cards only support stencil together with 24-bit depth, they pacj together 8 bits of stencil and 24-bits of depth into a nice round 32 bits (good for memory alignment). You particular card (an older GeForce perhaps?) probably doesn't support 24 bits of depth together with 16-bits of colour and therefore falls back to software. That's my guess anyway.

Ariel
07-07-2004, 05:52 AM
I have used the same code with a GeForce4Mx 128Mb and with a Voodoo3 and i got the same results 9 fps, Could it be possible?

Relic
07-07-2004, 06:04 AM
Yes, if both chips can't do it the limiting factor is how fast your CPU can render the image into the frame buffer.
Try the GeForce with true color and the 24 bit depth and 8 bit stencil pixelformat.
If that's still 9 fps, maybe your 500 polygons are that big, that you are fillrate limited.
To verify try if a smaller window size increases the performance.

Ariel
07-07-2004, 06:09 AM
Thanks Relix, In True Color it runs at 70 fps with VR :cool:

Relic
07-07-2004, 09:50 PM
Fine, 70 Hz sounds like monitor refresh rate.
If you want to try without, go to the display control panel, find the "wait for vertical retrace" or "vsync" switch in the GeForce tab and set it to off.