View Full Version : glScissor z inaccuracies

09-10-2002, 03:21 AM

If I scissor off a secion of the viewport, then record z values for geometry written there, then remove the scissor and draw the same geometry will the z results be equal?

I am getting flickering when using glScissor.

Any ideas?


09-10-2002, 03:36 AM
Yes the result will be equal as long as the polygons are not clipped in the scissor rectangle.

But when clipping happens, the GL may have to approximate the places where segments or polygons are clipped, and unfortunately you may encouter z-fighting between glScissor'ed and non-glScissor'ed passes.

09-10-2002, 05:49 AM
My reading of the invariance protion of the GL spec leads me to believe that you should not see variance in the depth values, as long as in the no scissor case you leave scissor enabled and set it to the size of the viewport.


09-10-2002, 06:42 AM
We had a discussion of this some time ago in this thread,

I'm not sure if his problem was solved in that thread but maybe it is of some use to you.