Tanji
01-02-2011, 05:08 AM
Hi all,
In the reference book for "void glStencilFunc(GLenum func,GLint ref, GLuint mask)" says that:
The reference value is compared with the value in the stencil buffer using the comparison function, but the comparison applies only to those bits for which the corresponding bits of the mask are 1.
If the stencil buffer contains s bitplanes, the low-order s bits of "mask" are bitwise ANDed with the value in the stencil buffer and with the reference value (ref) before the comparison is performed.
What am I supposed to deduce from this, if the mask is set somehow to 1 (probably from glStencilOp) then bitwise AND operator will be applied to ref value , stencil buffer and mask value, different values other than 1 for mask will be disregarded ?
Regards,
In the reference book for "void glStencilFunc(GLenum func,GLint ref, GLuint mask)" says that:
The reference value is compared with the value in the stencil buffer using the comparison function, but the comparison applies only to those bits for which the corresponding bits of the mask are 1.
If the stencil buffer contains s bitplanes, the low-order s bits of "mask" are bitwise ANDed with the value in the stencil buffer and with the reference value (ref) before the comparison is performed.
What am I supposed to deduce from this, if the mask is set somehow to 1 (probably from glStencilOp) then bitwise AND operator will be applied to ref value , stencil buffer and mask value, different values other than 1 for mask will be disregarded ?
Regards,