Graphics Reference
In-Depth Information
specify which bits of the stencil buffer are writable by providing a
mask.
void glStencilMask (GLuint mask )
specifies a bitmask (in the range [0, 2 n - 1], where n is the
number of bits in the stencil buffer) of which bits in a pixel in
the stencil buffer are modifiable.
mask
The glStencilMaskSeparate routine allows you to set the stencil mask
based on the face vertex order (sometimes called “facedness”) of the
primitive. This allows different stencil masks for front- and back-facing
primitives. glStencilMaskSeparate(GL_FRONT_AND_BACK, mask) is
identical to calling glStencilMask , which sets the same mask for the
front and back polygon faces.
void glStencilMaskSeparate (GLenum face , GLuint mask )
specifies the stencil mask to be applied based on the face vertex
order of the rendered primitive. Valid values are GL_FRONT ,
GL_BACK , and GL_FRONT_AND_BACK .
face
specifies a bitmask (in the range [0, 2 n ], where n is the number of
bits in the stencil buffer) of which bits in a pixel in the stencil
buffer are specified by face.
mask
Fragment Tests and Operations
The following sections describe the various tests that can be applied to
a fragment in OpenGL ES. By default, all fragment tests and operations
are disabled, and fragments become pixels as they are written to the
framebuffer in the order in which they are received. By enabling the
various fragments, operational tests can be applied to choose which
fragments become pixels and affect the final image.
Each fragment test is individually enabled by calling glEnable with the
appropriate token listed in Table 11-1.
 
 
 
Search WWH ::




Custom Search