View Full Version : stencil buffer question

11-22-2002, 01:16 AM

i have a few questions about the stencil buffer and his attitude.

I have delete my stencil buffer with 0 and a stencil mask 0xff. Now i decrement some values. Now what happens?
is the value there 255,-1, 1 or something else?

i have a problem with this in combination with shadow volumes.

thank you for your replys


11-22-2002, 02:00 AM
It depends on what function you use to decrement the index. With GL_DECR, decreasing zero results in zero. With GL_DECR_WRAP, decreasing zero results in the maximum representable value.

Read the specification for more info.

11-22-2002, 03:18 AM
thank you for the answer, i think this will help me!