PDA

View Full Version : Stencil maksing



JustHanging
05-05-2003, 03: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?

-Ilkka

Tom Nuydens
05-05-2003, 04: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

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

Thanks.

-Ilkka