glScissor z inaccuracies

Hi,

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?

Thanks,
Richard

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.

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.

-Evan

We had a discussion of this some time ago in this thread,
http://www.opengl.org/discussion_boards/ubb/Forum3/HTML/006785.html

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