rename upstream-man-pages to upstream-doc
[clinton/guile-figl.git] / upstream-doc / man2 / glIndex.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="glIndex">
5 <refmeta>
6 <refmetainfo>
7 <copyright>
8 <year>1991-2006</year>
9 <holder>Silicon Graphics, Inc.</holder>
10 </copyright>
11 </refmetainfo>
12 <refentrytitle>glIndex</refentrytitle>
13 <manvolnum>3G</manvolnum>
14 </refmeta>
15 <refnamediv>
16 <refname>glIndex</refname>
17 <refpurpose>set the current color index</refpurpose>
18 </refnamediv>
19 <para>
20 </para>
21 <refsynopsisdiv><title>C Specification</title>
22 <funcsynopsis>
23 <funcprototype>
24 <funcdef>void <function>glIndexs</function></funcdef>
25 <paramdef>GLshort <parameter>c</parameter></paramdef>
26 </funcprototype>
27 </funcsynopsis>
28 <funcsynopsis>
29 <funcprototype>
30 <funcdef>void <function>glIndexi</function></funcdef>
31 <paramdef>GLint <parameter>c</parameter></paramdef>
32 </funcprototype>
33 </funcsynopsis>
34 <funcsynopsis>
35 <funcprototype>
36 <funcdef>void <function>glIndexf</function></funcdef>
37 <paramdef>GLfloat <parameter>c</parameter></paramdef>
38 </funcprototype>
39 </funcsynopsis>
40 <funcsynopsis>
41 <funcprototype>
42 <funcdef>void <function>glIndexd</function></funcdef>
43 <paramdef>GLdouble <parameter>c</parameter></paramdef>
44 </funcprototype>
45 </funcsynopsis>
46 <funcsynopsis>
47 <funcprototype>
48 <funcdef>void <function>glIndexub</function></funcdef>
49 <paramdef>GLubyte <parameter>c</parameter></paramdef>
50 </funcprototype>
51 </funcsynopsis>
52 </refsynopsisdiv>
53 <refsect1 id="parameters"><title>Parameters</title>
54 <variablelist>
55 <varlistentry>
56 <term><parameter>c</parameter></term>
57 <listitem>
58 <para>
59 Specifies the new value for the current color index.
60 </para>
61 <para>
62 </para>
63 </listitem>
64 </varlistentry>
65 </variablelist>
66 </refsect1>
67 <refsynopsisdiv><title>C Specification</title>
68 <funcsynopsis>
69 <funcprototype>
70 <funcdef>void <function>glIndexsv</function></funcdef>
71 <paramdef>const GLshort * <parameter>c</parameter></paramdef>
72 </funcprototype>
73 </funcsynopsis>
74 <funcsynopsis>
75 <funcprototype>
76 <funcdef>void <function>glIndexiv</function></funcdef>
77 <paramdef>const GLint * <parameter>c</parameter></paramdef>
78 </funcprototype>
79 </funcsynopsis>
80 <funcsynopsis>
81 <funcprototype>
82 <funcdef>void <function>glIndexfv</function></funcdef>
83 <paramdef>const GLfloat * <parameter>c</parameter></paramdef>
84 </funcprototype>
85 </funcsynopsis>
86 <funcsynopsis>
87 <funcprototype>
88 <funcdef>void <function>glIndexdv</function></funcdef>
89 <paramdef>const GLdouble * <parameter>c</parameter></paramdef>
90 </funcprototype>
91 </funcsynopsis>
92 <funcsynopsis>
93 <funcprototype>
94 <funcdef>void <function>glIndexubv</function></funcdef>
95 <paramdef>const GLubyte * <parameter>c</parameter></paramdef>
96 </funcprototype>
97 </funcsynopsis>
98 </refsynopsisdiv>
99 <refsect1 id="parameters2"><title>Parameters</title>
100 <variablelist>
101 <varlistentry>
102 <term><parameter>c</parameter></term>
103 <listitem>
104 <para>
105 Specifies a pointer to a one-element array that contains
106 the new value for the current color index.
107 </para>
108 </listitem>
109 </varlistentry>
110 </variablelist>
111 </refsect1>
112 <refsect1 id="description"><title>Description</title>
113 <para>
114 <function>glIndex</function> updates the current (single-valued) color index.
115 It takes one argument, the new value for the current color index.
116 </para>
117 <para>
118 The current index is stored as a floating-point value.
119 Integer values are converted directly to floating-point values,
120 with no special mapping.
121 The initial value is 1.
122 </para>
123 <para>
124 Index values outside the representable range of the color index buffer
125 are not clamped.
126 However,
127 before an index is dithered (if enabled) and written to the frame buffer,
128 it is converted to fixed-point format.
129 Any bits in the integer portion of the resulting fixed-point value
130 that do not correspond to bits in the frame buffer are masked out.
131 </para>
132 </refsect1>
133 <refsect1 id="notes"><title>Notes</title>
134 <para>
135 <function>glIndexub</function> and <function>glIndexubv</function> are available only if the GL version is
136 1.1 or greater.
137 </para>
138 <para>
139 The current index can be updated at any time.
140 In particular,
141 <function>glIndex</function> can be called between a call to <citerefentry><refentrytitle>glBegin</refentrytitle></citerefentry> and the corresponding
142 call to <citerefentry><refentrytitle>glEnd</refentrytitle></citerefentry>.
143 </para>
144 </refsect1>
145 <refsect1 id="associatedgets"><title>Associated Gets</title>
146 <para>
147 <citerefentry><refentrytitle>glGet</refentrytitle></citerefentry> with argument <constant>GL_CURRENT_INDEX</constant>
148 </para>
149 </refsect1>
150 <refsect1 id="seealso"><title>See Also</title>
151 <para>
152 <citerefentry><refentrytitle>glColor</refentrytitle></citerefentry>,
153 <citerefentry><refentrytitle>glIndexPointer</refentrytitle></citerefentry>
154 </para>
155 </refsect1>
156 <refsect1 id="Copyright"><title>Copyright</title>
157 <para>
158 Copyright <trademark class="copyright"></trademark> 1991-2006
159 Silicon Graphics, Inc. This document is licensed under the SGI
160 Free Software B License. For details, see
161 <ulink url="http://oss.sgi.com/projects/FreeB/">http://oss.sgi.com/projects/FreeB/</ulink>.
162 </para>
163 </refsect1>
164 </refentry>