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=
"glIndexMask">
9 <holder>Silicon Graphics, Inc.
</holder>
12 <refentrytitle>glIndexMask
</refentrytitle>
13 <manvolnum>3G
</manvolnum>
16 <refname>glIndexMask
</refname>
17 <refpurpose>control the writing of individual bits in the color index buffers
</refpurpose>
19 <refsynopsisdiv><title>C Specification
</title>
22 <funcdef>void
<function>glIndexMask
</function></funcdef>
23 <paramdef>GLuint
<parameter>mask
</parameter></paramdef>
27 <!-- eqn: ignoring delim $$ -->
28 <refsect1 id=
"parameters"><title>Parameters
</title>
31 <term><parameter>mask
</parameter></term>
34 Specifies a bit mask to enable and disable the writing of individual bits
35 in the color index buffers.
36 Initially, the mask is all
1's.
42 <refsect1 id=
"description"><title>Description
</title>
44 <function>glIndexMask
</function> controls the writing of individual bits in the color index buffers.
46 <inlineequation><mml:math><mml:mi mathvariant=
"italic">n
</mml:mi></mml:math></inlineequation>
47 bits of
<parameter>mask
</parameter>,
49 <inlineequation><mml:math><mml:mi mathvariant=
"italic">n
</mml:mi></mml:math></inlineequation>
50 is the number of bits in a color index buffer,
52 Where a
1 (one) appears in the mask,
53 it's possible to write to the corresponding bit in the color index
55 Where a
0 (zero) appears,
56 the corresponding bit is write-protected.
59 This mask is used only in color index mode,
60 and it affects only the buffers currently selected for writing
61 (see
<citerefentry><refentrytitle>glDrawBuffer
</refentrytitle></citerefentry>).
62 Initially, all bits are enabled for writing.
65 <refsect1 id=
"errors"><title>Errors
</title>
67 <constant>GL_INVALID_OPERATION
</constant> is generated if
<function>glIndexMask
</function>
68 is executed between the execution of
<citerefentry><refentrytitle>glBegin
</refentrytitle></citerefentry>
69 and the corresponding execution of
<citerefentry><refentrytitle>glEnd
</refentrytitle></citerefentry>.
72 <refsect1 id=
"associatedgets"><title>Associated Gets
</title>
74 <citerefentry><refentrytitle>glGet
</refentrytitle></citerefentry> with argument
<constant>GL_INDEX_WRITEMASK
</constant>
77 <refsect1 id=
"seealso"><title>See Also
</title>
79 <citerefentry><refentrytitle>glColorMask
</refentrytitle></citerefentry>,
80 <citerefentry><refentrytitle>glDepthMask
</refentrytitle></citerefentry>,
81 <citerefentry><refentrytitle>glDrawBuffer
</refentrytitle></citerefentry>,
82 <citerefentry><refentrytitle>glIndex
</refentrytitle></citerefentry>,
83 <citerefentry><refentrytitle>glIndexPointer
</refentrytitle></citerefentry>,
84 <citerefentry><refentrytitle>glStencilMask
</refentrytitle></citerefentry>
87 <refsect1 id=
"Copyright"><title>Copyright
</title>
89 Copyright
<trademark class=
"copyright"></trademark> 1991-
2006
90 Silicon Graphics, Inc. This document is licensed under the SGI
91 Free Software B License. For details, see
92 <ulink url=
"http://oss.sgi.com/projects/FreeB/">http://oss.sgi.com/projects/FreeB/
</ulink>.