1 <?xml version=
"1.0" encoding=
"UTF-8"?>
2 <!DOCTYPE book PUBLIC
"-//OASIS//DTD DocBook MathML Module V1.1b1//EN"
3 "http://www.oasis-open.org/docbook/xml/mathml/1.1CR1/dbmathml.dtd">
4 <refentry id=
"glStencilMaskSeparate">
9 <holder>Silicon Graphics, Inc.
</holder>
12 <refentrytitle>glStencilMaskSeparate
</refentrytitle>
13 <manvolnum>3G
</manvolnum>
16 <refname>glStencilMaskSeparate
</refname>
17 <refpurpose>control the front and/or back writing of individual bits in the stencil planes
</refpurpose>
19 <refsynopsisdiv><title>C Specification
</title>
22 <funcdef>void
<function>glStencilMaskSeparate
</function></funcdef>
23 <paramdef>GLenum
<parameter>face
</parameter></paramdef>
24 <paramdef>GLuint
<parameter>mask
</parameter></paramdef>
28 <!-- eqn: ignoring delim $$ -->
29 <refsect1 id=
"parameters"><title>Parameters
</title>
32 <term><parameter>face
</parameter></term>
35 Specifies whether the front and/or back stencil writemask is updated.
36 Three symbolic constants are valid:
37 <constant>GL_FRONT
</constant>,
38 <constant>GL_BACK
</constant>, and
39 <constant>GL_FRONT_AND_BACK
</constant>.
44 <term><parameter>mask
</parameter></term>
47 Specifies a bit mask to enable and disable writing of individual bits
48 in the stencil planes.
49 Initially, the mask is all
1's.
55 <refsect1 id=
"description"><title>Description
</title>
57 <function>glStencilMaskSeparate
</function> controls the writing of individual bits in the stencil planes.
59 <inlineequation><mml:math><mml:mi mathvariant=
"italic">n
</mml:mi></mml:math></inlineequation>
60 bits of
<parameter>mask
</parameter>,
62 <inlineequation><mml:math><mml:mi mathvariant=
"italic">n
</mml:mi></mml:math></inlineequation>
63 is the number of bits in the stencil buffer,
65 Where a
1 appears in the mask,
66 it's possible to write to the corresponding bit in the stencil buffer.
68 the corresponding bit is write-protected.
69 Initially, all bits are enabled for writing.
72 There can be two separate
<parameter>mask
</parameter> writemasks; one affects back-facing polygons, and the other
73 affects front-facing polygons as well as other non-polygon primitives.
74 <citerefentry><refentrytitle>glStencilMask
</refentrytitle></citerefentry> sets both front
75 and back stencil writemasks to the same values, as if
76 <citerefentry><refentrytitle>glStencilMaskSeparate
</refentrytitle></citerefentry> were called
77 with
<parameter>face
</parameter> set to
<constant>GL_FRONT_AND_BACK
</constant>.
80 <refsect1 id=
"errors"><title>Errors
</title>
82 <constant>GL_INVALID_ENUM
</constant> is generated if
<parameter>face
</parameter> is not one of the accepted tokens.
85 <refsect1 id=
"associatedgets"><title>Associated Gets
</title>
87 <citerefentry><refentrytitle>glGet
</refentrytitle></citerefentry> with argument
88 <constant>GL_STENCIL_WRITEMASK
</constant>,
<constant>GL_STENCIL_BACK_WRITEMASK
</constant>,
89 or
<constant>GL_STENCIL_BITS
</constant>
92 <refsect1 id=
"seealso"><title>See Also
</title>
94 <citerefentry><refentrytitle>glColorMask
</refentrytitle></citerefentry>,
95 <citerefentry><refentrytitle>glDepthMask
</refentrytitle></citerefentry>,
96 <citerefentry><refentrytitle>glStencilFunc
</refentrytitle></citerefentry>,
97 <citerefentry><refentrytitle>glStencilFuncSeparate
</refentrytitle></citerefentry>,
98 <citerefentry><refentrytitle>glStencilMask
</refentrytitle></citerefentry>,
99 <citerefentry><refentrytitle>glStencilOp
</refentrytitle></citerefentry>,
100 <citerefentry><refentrytitle>glStencilOpSeparate
</refentrytitle></citerefentry>
103 <refsect1 id=
"Copyright"><title>Copyright
</title>
105 Copyright
<trademark class=
"copyright"></trademark> 2006 Khronos Group.
106 This material may be distributed subject to the terms and conditions set forth in
107 the Open Publication License, v
1.0,
8 June
1999.
108 <ulink url=
"http://opencontent.org/openpub/">http://opencontent.org/openpub/
</ulink>.