PDA

View Full Version : GL_INCR and GL_DECR of stencil buffer?



iShan_Hu
11-21-2005, 11:30 PM
Hello everyone.
Here is my question:
What happens to a stencil value in the stencil buffer when I specify GL_INCR or
GL_DECR as the stencil operations to do with glStencilOp() for any of the stencil tests?

Thanks a lot!

jide
11-22-2005, 01:50 AM
The stored values will be incremented or decremented, that's simple as that, depending on the fact that the test passes or fails.

Dark Photon
11-22-2005, 02:51 AM
jide:
The stored values will be incremented or decremented, that's simple as thatAlso note that these increments and decrements will saturate. If you don't want this, check out the GL_INCR_WRAP/GL_DECR_WRAP operations.