#include <mtypes.h>
Three sets of stencil data are tracked so that OpenGL 2.0, GL_EXT_stencil_two_side, and GL_ATI_separate_stencil can all be supported simultaneously. In each of the stencil state arrays, element 0 corresponds to GL_FRONT. Element 1 corresponds to the OpenGL 2.0 / GL_ATI_separate_stencil GL_BACK state. Element 2 corresponds to the GL_EXT_stencil_two_side GL_BACK state.
The derived value _BackFace is either 1 or 2 depending on whether or not GL_STENCIL_TEST_TWO_SIDE_EXT is enabled.
The derived value _TestTwoSide is set when the front-face and back-face stencil state are different.
Data Fields | |
| GLboolean | Enabled |
| Enabled flag. | |
| GLboolean | TestTwoSide |
| GL_EXT_stencil_two_side. | |
| GLubyte | ActiveFace |
| GL_EXT_stencil_two_side (0 or 2). | |
| GLboolean | _Enabled |
| Enabled and stencil buffer present. | |
| GLboolean | _TestTwoSide |
| GLubyte | _BackFace |
| Current back stencil state (1 or 2). | |
| GLenum | Function [3] |
| Stencil function. | |
| GLenum | FailFunc [3] |
| Fail function. | |
| GLenum | ZPassFunc [3] |
| Depth buffer pass function. | |
| GLenum | ZFailFunc [3] |
| Depth buffer fail function. | |
| GLint | Ref [3] |
| Reference value. | |
| GLuint | ValueMask [3] |
| Value mask. | |
| GLuint | WriteMask [3] |
| Write mask. | |
| GLuint | Clear |
| Clear value. | |
| GLboolean gl_stencil_attrib::Enabled |
Enabled flag.
| GLboolean gl_stencil_attrib::TestTwoSide |
GL_EXT_stencil_two_side.
| GLubyte gl_stencil_attrib::ActiveFace |
GL_EXT_stencil_two_side (0 or 2).
| GLboolean gl_stencil_attrib::_Enabled |
Enabled and stencil buffer present.
| GLboolean gl_stencil_attrib::_TestTwoSide |
| GLubyte gl_stencil_attrib::_BackFace |
Current back stencil state (1 or 2).
| GLenum gl_stencil_attrib::Function[3] |
Stencil function.
| GLenum gl_stencil_attrib::FailFunc[3] |
Fail function.
| GLenum gl_stencil_attrib::ZPassFunc[3] |
Depth buffer pass function.
| GLenum gl_stencil_attrib::ZFailFunc[3] |
Depth buffer fail function.
| GLint gl_stencil_attrib::Ref[3] |
Reference value.
| GLuint gl_stencil_attrib::ValueMask[3] |
Value mask.
| GLuint gl_stencil_attrib::WriteMask[3] |
Write mask.
| GLuint gl_stencil_attrib::Clear |
Clear value.
1.5.4