Jump to content
  • Advertisement
Sign in to follow this  

Stencil buffer question

This topic is 3003 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hey everyone! Here is a problem:having a stencil buffer activated with a function: glStencilFunc(GL_ALWAYS,0,0); glStencilOp(GL_KEEP,GL_KEEP,GL_INCR); i draw only one object,so once i have it,object's pixels in a stencil buffer are all equals to 1.I can check it this way: glStencilFunc(GL_EQUAL,1,1); Now,if i change reference and mask value to 0,i will still have my object on a screen(meaning it has passed the test)!Can anyone explain how is it possible?And it happens in more complex cases,just as if there is nothing in stencil buffer but 0's.

Share this post

Link to post
Share on other sites
Sign in to follow this  

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!