View Full Version : Stencil buffer question

02-11-2001, 03:19 PM
Is it possible to use the stencil buffer to test whether a polygon would be drawn or not?
I what to find out if a particular polygon would be drawn or not without actually drawing it.
If I can check the stencil buffer against the zbuffer, it would solve my problem.

02-11-2001, 06:39 PM
maybe this (not gonna be blinding quick though)
draw the polygon with glColourMask GL_FALSE,F,F,F (so it doesnt show up on the screen) and some sort of stencil write enabled.
draw the rest of the scene.
then use glReadPixels(.. GL_STENCIL_INDEX )
and check the data out