65b13dbfefd59b74e4ec2fc6a76eaa040720ae13
[clinton/guile-figl.git] / upstream-man-pages / man4 / 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="associatedgets"><title>Associated Gets</title>
74 <para>
75 <citerefentry><refentrytitle>glGet</refentrytitle></citerefentry> with argument
76 <constant>GL_STENCIL_WRITEMASK</constant>, <constant>GL_STENCIL_BACK_WRITEMASK</constant>,
77 or <constant>GL_STENCIL_BITS</constant>
78 </para>
79 </refsect1>
80 <refsect1 id="seealso"><title>See Also</title>
81 <para>
82 <citerefentry><refentrytitle>glColorMask</refentrytitle></citerefentry>,
83 <citerefentry><refentrytitle>glDepthMask</refentrytitle></citerefentry>,
84 <citerefentry><refentrytitle>glStencilFunc</refentrytitle></citerefentry>,
85 <citerefentry><refentrytitle>glStencilFuncSeparate</refentrytitle></citerefentry>,
86 <citerefentry><refentrytitle>glStencilMaskSeparate</refentrytitle></citerefentry>,
87 <citerefentry><refentrytitle>glStencilOp</refentrytitle></citerefentry>,
88 <citerefentry><refentrytitle>glStencilOpSeparate</refentrytitle></citerefentry>
89 </para>
90 </refsect1>
91 <refsect1 id="Copyright"><title>Copyright</title>
92 <para>
93 Copyright <trademark class="copyright"></trademark> 1991-2006
94 Silicon Graphics, Inc. This document is licensed under the SGI
95 Free Software B License. For details, see
96 <ulink url="http://oss.sgi.com/projects/FreeB/">http://oss.sgi.com/projects/FreeB/</ulink>.
97 </para>
98 </refsect1>
99 </refentry>