rename upstream-man-pages to upstream-doc
[clinton/guile-figl.git] / upstream-doc / man2 / glStencilMask.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="glStencilMask">
5 <refmeta>
6 <refmetainfo>
7 <copyright>
8 <year>1991-2006</year>
9 <holder>Silicon Graphics, Inc.</holder>
10 </copyright>
11 </refmetainfo>
12 <refentrytitle>glStencilMask</refentrytitle>
13 <manvolnum>3G</manvolnum>
14 </refmeta>
15 <refnamediv>
16 <refname>glStencilMask</refname>
17 <refpurpose>control the front and 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>glStencilMask</function></funcdef>
23 <paramdef>GLuint <parameter>mask</parameter></paramdef>
24 </funcprototype>
25 </funcsynopsis>
26 </refsynopsisdiv>
27 <!-- eqn: ignoring delim $$ -->
28 <refsect1 id="parameters"><title>Parameters</title>
29 <variablelist>
30 <varlistentry>
31 <term><parameter>mask</parameter></term>
32 <listitem>
33 <para>
34 Specifies a bit mask to enable and disable writing of individual bits
35 in the stencil planes.
36 Initially, the mask is all 1's.
37 </para>
38 </listitem>
39 </varlistentry>
40 </variablelist>
41 </refsect1>
42 <refsect1 id="description"><title>Description</title>
43 <para>
44 <function>glStencilMask</function> controls the writing of individual bits in the stencil planes.
45 The least significant
46 <inlineequation><mml:math><mml:mi mathvariant="italic">n</mml:mi></mml:math></inlineequation>
47 bits of <parameter>mask</parameter>,
48 where
49 <inlineequation><mml:math><mml:mi mathvariant="italic">n</mml:mi></mml:math></inlineequation>
50 is the number of bits in the stencil buffer,
51 specify a mask.
52 Where a 1 appears in the mask,
53 it's possible to write to the corresponding bit in the stencil buffer.
54 Where a 0 appears,
55 the corresponding bit is write-protected.
56 Initially, all bits are enabled for writing.
57 </para>
58 <para>
59 There can be two separate <parameter>mask</parameter> writemasks; one affects back-facing polygons, and the other
60 affects front-facing polygons as well as other non-polygon primitives.
61 <citerefentry><refentrytitle>glStencilMask</refentrytitle></citerefentry> sets both front
62 and back stencil writemasks to the same values. Use <citerefentry><refentrytitle>glStencilMaskSeparate</refentrytitle></citerefentry>
63 to set front and back stencil writemasks to different values.
64 </para>
65 </refsect1>
66 <refsect1 id="notes"><title>Notes</title>
67 <para>
68 <citerefentry><refentrytitle>glStencilMask</refentrytitle></citerefentry> is the same as
69 calling <citerefentry><refentrytitle>glStencilMaskSeparate</refentrytitle></citerefentry>
70 with <parameter>face</parameter> set to <constant>GL_FRONT_AND_BACK</constant>.
71 </para>
72 </refsect1>
73 <refsect1 id="errors"><title>Errors</title>
74 <para>
75 <constant>GL_INVALID_OPERATION</constant> is generated if <function>glStencilMask</function>
76 is executed between the execution of <citerefentry><refentrytitle>glBegin</refentrytitle></citerefentry>
77 and the corresponding execution of <citerefentry><refentrytitle>glEnd</refentrytitle></citerefentry>.
78 </para>
79 </refsect1>
80 <refsect1 id="associatedgets"><title>Associated Gets</title>
81 <para>
82 <citerefentry><refentrytitle>glGet</refentrytitle></citerefentry> with argument
83 <constant>GL_STENCIL_WRITEMASK</constant>, <constant>GL_STENCIL_BACK_WRITEMASK</constant>,
84 or <constant>GL_STENCIL_BITS</constant>
85 </para>
86 </refsect1>
87 <refsect1 id="seealso"><title>See Also</title>
88 <para>
89 <citerefentry><refentrytitle>glColorMask</refentrytitle></citerefentry>,
90 <citerefentry><refentrytitle>glDepthMask</refentrytitle></citerefentry>,
91 <citerefentry><refentrytitle>glIndexMask</refentrytitle></citerefentry>,
92 <citerefentry><refentrytitle>glStencilFunc</refentrytitle></citerefentry>,
93 <citerefentry><refentrytitle>glStencilFuncSeparate</refentrytitle></citerefentry>,
94 <citerefentry><refentrytitle>glStencilMaskSeparate</refentrytitle></citerefentry>,
95 <citerefentry><refentrytitle>glStencilOp</refentrytitle></citerefentry>,
96 <citerefentry><refentrytitle>glStencilOpSeparate</refentrytitle></citerefentry>
97 </para>
98 </refsect1>
99 <refsect1 id="Copyright"><title>Copyright</title>
100 <para>
101 Copyright <trademark class="copyright"></trademark> 1991-2006
102 Silicon Graphics, Inc. This document is licensed under the SGI
103 Free Software B License. For details, see
104 <ulink url="http://oss.sgi.com/projects/FreeB/">http://oss.sgi.com/projects/FreeB/</ulink>.
105 </para>
106 </refsect1>
107 </refentry>