dda31a80b9942b464f0910ab75f2eb368e076bcb
[clinton/guile-figl.git] / upstream-man-pages / man2 / glClearIndex.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="glClearIndex">
5 <refmeta>
6 <refmetainfo>
7 <copyright>
8 <year>1991-2006</year>
9 <holder>Silicon Graphics, Inc.</holder>
10 </copyright>
11 </refmetainfo>
12 <refentrytitle>glClearIndex</refentrytitle>
13 <manvolnum>3G</manvolnum>
14 </refmeta>
15 <refnamediv>
16 <refname>glClearIndex</refname>
17 <refpurpose>specify the clear value for the color index buffers</refpurpose>
18 </refnamediv>
19 <refsynopsisdiv><title>C Specification</title>
20 <funcsynopsis>
21 <funcprototype>
22 <funcdef>void <function>glClearIndex</function></funcdef>
23 <paramdef>GLfloat <parameter>c</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>c</parameter></term>
32 <listitem>
33 <para>
34 Specifies the index used when the color index buffers are cleared.
35 The initial value is 0.
36 </para>
37 </listitem>
38 </varlistentry>
39 </variablelist>
40 </refsect1>
41 <refsect1 id="description"><title>Description</title>
42 <para>
43 <function>glClearIndex</function> specifies the index used by <citerefentry><refentrytitle>glClear</refentrytitle></citerefentry>
44 to clear the color index buffers.
45 <parameter>c</parameter> is not clamped.
46 Rather,
47 <parameter>c</parameter> is converted to a fixed-point value with unspecified precision
48 to the right of the binary point.
49 The integer part of this value is then masked with
50 <inlineequation><mml:math>
51 <!-- eqn: 2 sup m - 1:-->
52 <mml:mrow>
53 <mml:msup><mml:mn>2</mml:mn>
54 <mml:mi mathvariant="italic">m</mml:mi>
55 </mml:msup>
56 <mml:mo>-</mml:mo>
57 <mml:mn>1</mml:mn>
58 </mml:mrow>
59 </mml:math></inlineequation>,
60 where
61 <inlineequation><mml:math><mml:mi mathvariant="italic">m</mml:mi></mml:math></inlineequation>
62 is the number of bits in a color index stored in the frame buffer.
63 </para>
64 </refsect1>
65 <refsect1 id="errors"><title>Errors</title>
66 <para>
67 <constant>GL_INVALID_OPERATION</constant> is generated if <function>glClearIndex</function>
68 is executed between the execution of <citerefentry><refentrytitle>glBegin</refentrytitle></citerefentry>
69 and the corresponding execution of <citerefentry><refentrytitle>glEnd</refentrytitle></citerefentry>.
70 </para>
71 </refsect1>
72 <refsect1 id="associatedgets"><title>Associated Gets</title>
73 <para>
74 <citerefentry><refentrytitle>glGet</refentrytitle></citerefentry> with argument <constant>GL_INDEX_CLEAR_VALUE</constant>
75 </para>
76 <para>
77 <citerefentry><refentrytitle>glGet</refentrytitle></citerefentry> with argument <constant>GL_INDEX_BITS</constant>
78 </para>
79 </refsect1>
80 <refsect1 id="seealso"><title>See Also</title>
81 <para>
82 <citerefentry><refentrytitle>glClear</refentrytitle></citerefentry>
83 </para>
84 </refsect1>
85 <refsect1 id="Copyright"><title>Copyright</title>
86 <para>
87 Copyright <trademark class="copyright"></trademark> 1991-2006
88 Silicon Graphics, Inc. This document is licensed under the SGI
89 Free Software B License. For details, see
90 <ulink url="http://oss.sgi.com/projects/FreeB/">http://oss.sgi.com/projects/FreeB/</ulink>.
91 </para>
92 </refsect1>
93 </refentry>