include more low-level bindings
[clinton/guile-figl.git] / upstream-man-pages / man3 / 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="errors"><title>Errors</title>
81 <para>
82 <constant>GL_INVALID_ENUM</constant> is generated if <parameter>face</parameter> is not one of the accepted tokens.
83 </para>
84 </refsect1>
85 <refsect1 id="associatedgets"><title>Associated Gets</title>
86 <para>
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>
90 </para>
91 </refsect1>
92 <refsect1 id="seealso"><title>See Also</title>
93 <para>
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>
101 </para>
102 </refsect1>
103 <refsect1 id="Copyright"><title>Copyright</title>
104 <para>
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>.
109 </para>
110 </refsect1>
111 </refentry>