Stencil Buffer

Hi guys, is there any way to ‘see’ the stencil buffer content ? Because in my application i’m having a problem and i assume that the stencil buffer is not being written well. First i do some increments and decrements and then i draw the scene where the stencil is 0 setting glStencilOp(GL_EQUAL, 0, ~0); but the entire scene gets drawn and it wasn’t the expected and i’m totally sure that the stencil buffer containts fragments with non-zero values.

Anyone please?


You can use glReadPixels and glDrawPixels to display the stencil buffer in screen.

And your problem, did you enable the stencil test?