Commit | Line | Data |
---|---|---|
7faf1d71 AW |
1 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "xhtml1-transitional.dtd"> |
2 | <!-- saved from url=(0013)about:internet --> | |
3 | <?xml-stylesheet type="text/xsl" href="mathml.xsl"?><html xmlns="http://www.w3.org/1999/xhtml" xmlns:pref="http://www.w3.org/2002/Math/preference" pref:renderer="mathplayer-dl"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>glIndex</title><meta name="generator" content="DocBook XSL Stylesheets V1.73.2" /></head><body><div class="refentry" lang="en" xml:lang="en"><a id="glIndex"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>glIndex — set the current color index</p></div><p> | |
4 | </p><div class="refsynopsisdiv"><h2>C Specification</h2><div class="funcsynopsis"><table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0"><tr><td><code class="funcdef">void <b class="fsfunc">glIndexs</b>(</code></td><td>GLshort </td><td><var class="pdparam">c</var><code>)</code>;</td></tr></table></div><div class="funcsynopsis"><table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0"><tr><td><code class="funcdef">void <b class="fsfunc">glIndexi</b>(</code></td><td>GLint </td><td><var class="pdparam">c</var><code>)</code>;</td></tr></table></div><div class="funcsynopsis"><table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0"><tr><td><code class="funcdef">void <b class="fsfunc">glIndexf</b>(</code></td><td>GLfloat </td><td><var class="pdparam">c</var><code>)</code>;</td></tr></table></div><div class="funcsynopsis"><table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0"><tr><td><code class="funcdef">void <b class="fsfunc">glIndexd</b>(</code></td><td>GLdouble </td><td><var class="pdparam">c</var><code>)</code>;</td></tr></table></div><div class="funcsynopsis"><table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0"><tr><td><code class="funcdef">void <b class="fsfunc">glIndexub</b>(</code></td><td>GLubyte </td><td><var class="pdparam">c</var><code>)</code>;</td></tr></table></div></div><div class="refsect1" lang="en" xml:lang="en"><a id="parameters"></a><h2>Parameters</h2><div class="variablelist"><dl><dt><span class="term"><em class="parameter"><code>c</code></em></span></dt><dd><p> | |
5 | Specifies the new value for the current color index. | |
6 | </p><p> | |
7 | </p></dd></dl></div></div><div class="refsynopsisdiv"><h2>C Specification</h2><div class="funcsynopsis"><table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0"><tr><td><code class="funcdef">void <b class="fsfunc">glIndexsv</b>(</code></td><td>const GLshort * </td><td><var class="pdparam">c</var><code>)</code>;</td></tr></table></div><div class="funcsynopsis"><table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0"><tr><td><code class="funcdef">void <b class="fsfunc">glIndexiv</b>(</code></td><td>const GLint * </td><td><var class="pdparam">c</var><code>)</code>;</td></tr></table></div><div class="funcsynopsis"><table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0"><tr><td><code class="funcdef">void <b class="fsfunc">glIndexfv</b>(</code></td><td>const GLfloat * </td><td><var class="pdparam">c</var><code>)</code>;</td></tr></table></div><div class="funcsynopsis"><table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0"><tr><td><code class="funcdef">void <b class="fsfunc">glIndexdv</b>(</code></td><td>const GLdouble * </td><td><var class="pdparam">c</var><code>)</code>;</td></tr></table></div><div class="funcsynopsis"><table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0"><tr><td><code class="funcdef">void <b class="fsfunc">glIndexubv</b>(</code></td><td>const GLubyte * </td><td><var class="pdparam">c</var><code>)</code>;</td></tr></table></div></div><div class="refsect1" lang="en" xml:lang="en"><a id="parameters2"></a><h2>Parameters</h2><div class="variablelist"><dl><dt><span class="term"><em class="parameter"><code>c</code></em></span></dt><dd><p> | |
8 | Specifies a pointer to a one-element array that contains | |
9 | the new value for the current color index. | |
10 | </p></dd></dl></div></div><div class="refsect1" lang="en" xml:lang="en"><a id="description"></a><h2>Description</h2><p> | |
11 | <code class="function">glIndex</code> updates the current (single-valued) color index. | |
12 | It takes one argument, the new value for the current color index. | |
13 | </p><p> | |
14 | The current index is stored as a floating-point value. | |
15 | Integer values are converted directly to floating-point values, | |
16 | with no special mapping. | |
17 | The initial value is 1. | |
18 | </p><p> | |
19 | Index values outside the representable range of the color index buffer | |
20 | are not clamped. | |
21 | However, | |
22 | before an index is dithered (if enabled) and written to the frame buffer, | |
23 | it is converted to fixed-point format. | |
24 | Any bits in the integer portion of the resulting fixed-point value | |
25 | that do not correspond to bits in the frame buffer are masked out. | |
26 | </p></div><div class="refsect1" lang="en" xml:lang="en"><a id="notes"></a><h2>Notes</h2><p> | |
27 | <code class="function">glIndexub</code> and <code class="function">glIndexubv</code> are available only if the GL version is | |
28 | 1.1 or greater. | |
29 | </p><p> | |
30 | The current index can be updated at any time. | |
31 | In particular, | |
32 | <code class="function">glIndex</code> can be called between a call to <a class="citerefentry" href="glBegin.xml"><span class="citerefentry"><span class="refentrytitle">glBegin</span></span></a> and the corresponding | |
33 | call to <a class="citerefentry" href="glEnd.xml"><span class="citerefentry"><span class="refentrytitle">glEnd</span></span></a>. | |
34 | </p></div><div class="refsect1" lang="en" xml:lang="en"><a id="associatedgets"></a><h2>Associated Gets</h2><p> | |
35 | <a class="citerefentry" href="glGet.xml"><span class="citerefentry"><span class="refentrytitle">glGet</span></span></a> with argument <code class="constant">GL_CURRENT_INDEX</code> | |
36 | </p></div><div class="refsect1" lang="en" xml:lang="en"><a id="seealso"></a><h2>See Also</h2><p> | |
37 | <a class="citerefentry" href="glColor.xml"><span class="citerefentry"><span class="refentrytitle">glColor</span></span></a>, | |
38 | <a class="citerefentry" href="glIndexPointer.xml"><span class="citerefentry"><span class="refentrytitle">glIndexPointer</span></span></a> | |
39 | </p></div><div class="refsect1" lang="en" xml:lang="en"><a id="Copyright"></a><h2>Copyright</h2><p> | |
40 | Copyright <span class="trademark"></span>© 1991-2006 | |
41 | Silicon Graphics, Inc. This document is licensed under the SGI | |
42 | Free Software B License. For details, see | |
43 | <a class="ulink" href="http://oss.sgi.com/projects/FreeB/" target="_top">http://oss.sgi.com/projects/FreeB/</a>. | |
44 | </p></div></div></body></html> |