Hi,
If I use the following code:
//set up the stencil so it will have a 1 when something is drawn
glClear(GL_STENCIL_BUFFER);
glStencilFunc(GL_ALWAYS, 0x1, 0x1);
glStencilOp(GL_REPLACE, GL_REPLACE, GL_REPLACE);
//draw some geometry
..
..
..
//now I want to draw using glDrawPixels where the stencil is not 1
glStencilFunc(GL_NOTEQUAL, 0x1, 0x1);
glStencilOp(GL_KEEP, GL_KEEP, GL_KEEP);
//use glDrawPixels to draw my image to the background
My question is:
Will the stencil buffer affect the glDrawPixels so that only the
region of the color buffer where the stencil buffer is not 1 is drawn
to?
Thanks,
Judie


|