include more low-level bindings
[clinton/guile-figl.git] / upstream-man-pages / man2 / glStencilMaskSeparate.xml
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">
5 <refmeta>
6 <refmetainfo>
7 <copyright>
8 <year>1991-2006</year>
9 <holder>Silicon Graphics, Inc.</holder>
10 </copyright>
11 </refmetainfo>
12 <refentrytitle>glStencilMaskSeparate</refentrytitle>
13 <manvolnum>3G</manvolnum>
14 </refmeta>
15 <refnamediv>
16 <refname>glStencilMaskSeparate</refname>
17 <refpurpose>control the front and/or back writing of individual bits in the stencil planes</refpurpose>
18 </refnamediv>
19 <refsynopsisdiv><title>C Specification</title>
20 <funcsynopsis>
21 <funcprototype>
22 <funcdef>void <function>glStencilMaskSeparate</function></funcdef>
23 <paramdef>GLenum <parameter>face</parameter></paramdef>
24 <paramdef>GLuint <parameter>mask</parameter></paramdef>
25 </funcprototype>
26 </funcsynopsis>
27 </refsynopsisdiv>
28 <!-- eqn: ignoring delim $$ -->
29 <refsect1 id="parameters"><title>Parameters</title>
30 <variablelist>
31 <varlistentry>
32 <term><parameter>face</parameter></term>
33 <listitem>
34 <para>
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>.
40 </para>
41 </listitem>
42 </varlistentry>
43 <varlistentry>
44 <term><parameter>mask</parameter></term>
45 <listitem>
46 <para>
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.
50 </para>
51 </listitem>
52 </varlistentry>
53 </variablelist>
54 </refsect1>
55 <refsect1 id="description"><title>Description</title>
56 <para>
57 <function>glStencilMaskSeparate</function> controls the writing of individual bits in the stencil planes.
58 The least significant
59 <inlineequation><mml:math><mml:mi mathvariant="italic">n</mml:mi></mml:math></inlineequation>
60 bits of <parameter>mask</parameter>,
61 where
62 <inlineequation><mml:math><mml:mi mathvariant="italic">n</mml:mi></mml:math></inlineequation>
63 is the number of bits in the stencil buffer,
64 specify a mask.
65 Where a 1 appears in the mask,
66 it's possible to write to the corresponding bit in the stencil buffer.
67 Where a 0 appears,
68 the corresponding bit is write-protected.
69 Initially, all bits are enabled for writing.
70 </para>
71 <para>
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>.
78 </para>
79 </refsect1>
80 <refsect1 id="notes"><title>Notes</title>
81 <para>
82 <function>glStencilMaskSeparate</function> is available only if
83 the GL version is 2.0 or greater.
84 </para>
85 </refsect1>
86 <refsect1 id="errors"><title>Errors</title>
87 <para>
88 <constant>GL_INVALID_OPERATION</constant> is generated if <function>glStencilMaskSeparate</function>
89 is executed between the execution of <citerefentry><refentrytitle>glBegin</refentrytitle></citerefentry>
90 and the corresponding execution of <citerefentry><refentrytitle>glEnd</refentrytitle></citerefentry>.
91 </para>
92 </refsect1>
93 <refsect1 id="associatedgets"><title>Associated Gets</title>
94 <para>
95 <citerefentry><refentrytitle>glGet</refentrytitle></citerefentry> with argument
96 <constant>GL_STENCIL_WRITEMASK</constant>, <constant>GL_STENCIL_BACK_WRITEMASK</constant>,
97 or <constant>GL_STENCIL_BITS</constant>
98 </para>
99 </refsect1>
100 <refsect1 id="seealso"><title>See Also</title>
101 <para>
102 <citerefentry><refentrytitle>glColorMask</refentrytitle></citerefentry>,
103 <citerefentry><refentrytitle>glDepthMask</refentrytitle></citerefentry>,
104 <citerefentry><refentrytitle>glIndexMask</refentrytitle></citerefentry>,
105 <citerefentry><refentrytitle>glStencilFunc</refentrytitle></citerefentry>,
106 <citerefentry><refentrytitle>glStencilFuncSeparate</refentrytitle></citerefentry>,
107 <citerefentry><refentrytitle>glStencilMask</refentrytitle></citerefentry>,
108 <citerefentry><refentrytitle>glStencilOp</refentrytitle></citerefentry>,
109 <citerefentry><refentrytitle>glStencilOpSeparate</refentrytitle></citerefentry>
110 </para>
111 </refsect1>
112 <refsect1 id="Copyright"><title>Copyright</title>
113 <para>
114 Copyright <trademark class="copyright"></trademark> 2006 Khronos Group.
115 This material may be distributed subject to the terms and conditions set forth in
116 the Open Publication License, v 1.0, 8 June 1999.
117 <ulink url="http://opencontent.org/openpub/">http://opencontent.org/openpub/</ulink>.
118 </para>
119 </refsect1>
120 </refentry>