Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Graphics > OpenGL 3D API > Can glStencilFu...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 2 Topic 4780 of 4908
Post > Topic >>

Can glStencilFunc and glStencilOp affect glDrawPixels?

by Judie <judie.m.stanley@[EMAIL PROTECTED] > Jun 3, 2008 at 03:59 PM

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
 




 2 Posts in Topic:
Can glStencilFunc and glStencilOp affect glDrawPixels?
Judie <judie.m.stanley  2008-06-03 15:59:21 
Re: Can glStencilFunc and glStencilOp affect glDrawPixels?
fungus <openglMYSOCKS@  2008-06-04 00:49:43 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Fri Sep 5 23:00:14 CDT 2008.