View Full Version : Stencil maksing

05-05-2003, 02:27 AM
Ok, this might belong to the beginners forum, but anyways:

How can I set individual bits in the stencil buffer? I thought it could be done with the mask thing, but it appears that it doesn't affect stencil writes. There's no OR or ADD operation, so what am I supposed to do?


Tom Nuydens
05-05-2003, 03:42 AM
If by "the mask thing" you mean glStencilMask(), then it should work: http://www.3dlabs.com/support/developer/GLmanpages/glstencilmask.htm

If however you're reffering to the "mask" parameter of glStencilFunc(), then indeed it does not affect stencil writes. You need to use glStencilMask() instead http://www.opengl.org/discussion_boards/ubb/smile.gif

-- Tom

05-05-2003, 09:18 AM
Look at that, I didn't know such thing even existed. I was refering to the parameter.