rename upstream-man-pages to upstream-doc
[clinton/guile-figl.git] / upstream-doc / man2 / glSecondaryColor.xml
CommitLineData
7faf1d71
AW
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="glSecondaryColor">
5 <refmeta>
6 <refmetainfo>
7 <copyright>
8 <year>1991-2006</year>
9 <holder>Silicon Graphics, Inc.</holder>
10 </copyright>
11 </refmetainfo>
12 <refentrytitle>glSecondaryColor</refentrytitle>
13 <manvolnum>3G</manvolnum>
14 </refmeta>
15 <refnamediv>
16 <refname>glSecondaryColor</refname>
17 <refpurpose>set the current secondary color</refpurpose>
18 </refnamediv>
19 <refsynopsisdiv><title>C Specification</title>
20 <funcsynopsis>
21 <funcprototype>
22 <funcdef>void <function>glSecondaryColor3b</function></funcdef>
23 <paramdef>GLbyte <parameter>red</parameter></paramdef>
24 <paramdef>GLbyte <parameter>green</parameter></paramdef>
25 <paramdef>GLbyte <parameter>blue</parameter></paramdef>
26 </funcprototype>
27 </funcsynopsis>
28 <funcsynopsis>
29 <funcprototype>
30 <funcdef>void <function>glSecondaryColor3s</function></funcdef>
31 <paramdef>GLshort <parameter>red</parameter></paramdef>
32 <paramdef>GLshort <parameter>green</parameter></paramdef>
33 <paramdef>GLshort <parameter>blue</parameter></paramdef>
34 </funcprototype>
35 </funcsynopsis>
36 <funcsynopsis>
37 <funcprototype>
38 <funcdef>void <function>glSecondaryColor3i</function></funcdef>
39 <paramdef>GLint <parameter>red</parameter></paramdef>
40 <paramdef>GLint <parameter>green</parameter></paramdef>
41 <paramdef>GLint <parameter>blue</parameter></paramdef>
42 </funcprototype>
43 </funcsynopsis>
44 <funcsynopsis>
45 <funcprototype>
46 <funcdef>void <function>glSecondaryColor3f</function></funcdef>
47 <paramdef>GLfloat <parameter>red</parameter></paramdef>
48 <paramdef>GLfloat <parameter>green</parameter></paramdef>
49 <paramdef>GLfloat <parameter>blue</parameter></paramdef>
50 </funcprototype>
51 </funcsynopsis>
52 <funcsynopsis>
53 <funcprototype>
54 <funcdef>void <function>glSecondaryColor3d</function></funcdef>
55 <paramdef>GLdouble <parameter>red</parameter></paramdef>
56 <paramdef>GLdouble <parameter>green</parameter></paramdef>
57 <paramdef>GLdouble <parameter>blue</parameter></paramdef>
58 </funcprototype>
59 </funcsynopsis>
60 <funcsynopsis>
61 <funcprototype>
62 <funcdef>void <function>glSecondaryColor3ub</function></funcdef>
63 <paramdef>GLubyte <parameter>red</parameter></paramdef>
64 <paramdef>GLubyte <parameter>green</parameter></paramdef>
65 <paramdef>GLubyte <parameter>blue</parameter></paramdef>
66 </funcprototype>
67 </funcsynopsis>
68 <funcsynopsis>
69 <funcprototype>
70 <funcdef>void <function>glSecondaryColor3us</function></funcdef>
71 <paramdef>GLushort <parameter>red</parameter></paramdef>
72 <paramdef>GLushort <parameter>green</parameter></paramdef>
73 <paramdef>GLushort <parameter>blue</parameter></paramdef>
74 </funcprototype>
75 </funcsynopsis>
76 <funcsynopsis>
77 <funcprototype>
78 <funcdef>void <function>glSecondaryColor3ui</function></funcdef>
79 <paramdef>GLuint <parameter>red</parameter></paramdef>
80 <paramdef>GLuint <parameter>green</parameter></paramdef>
81 <paramdef>GLuint <parameter>blue</parameter></paramdef>
82 </funcprototype>
83 </funcsynopsis>
84 </refsynopsisdiv>
85 <!-- eqn: ignoring delim $$ -->
86 <refsect1 id="parameters"><title>Parameters</title>
87 <variablelist>
88 <varlistentry>
89 <term><parameter>red</parameter></term>
90 <term><parameter>green</parameter></term>
91 <term><parameter>blue</parameter></term>
92 <listitem>
93 <para>
94 Specify new red, green, and blue values for the current secondary color.
95 </para>
96 </listitem>
97 </varlistentry>
98 </variablelist>
99 </refsect1>
100 <refsynopsisdiv><title>C Specification</title>
101 <funcsynopsis>
102 <funcprototype>
103 <funcdef>void <function>glSecondaryColor3bv</function></funcdef>
104 <paramdef>const GLbyte * <parameter>v</parameter></paramdef>
105 </funcprototype>
106 </funcsynopsis>
107 <funcsynopsis>
108 <funcprototype>
109 <funcdef>void <function>glSecondaryColor3sv</function></funcdef>
110 <paramdef>const GLshort * <parameter>v</parameter></paramdef>
111 </funcprototype>
112 </funcsynopsis>
113 <funcsynopsis>
114 <funcprototype>
115 <funcdef>void <function>glSecondaryColor3iv</function></funcdef>
116 <paramdef>const GLint * <parameter>v</parameter></paramdef>
117 </funcprototype>
118 </funcsynopsis>
119 <funcsynopsis>
120 <funcprototype>
121 <funcdef>void <function>glSecondaryColor3fv</function></funcdef>
122 <paramdef>const GLfloat * <parameter>v</parameter></paramdef>
123 </funcprototype>
124 </funcsynopsis>
125 <funcsynopsis>
126 <funcprototype>
127 <funcdef>void <function>glSecondaryColor3dv</function></funcdef>
128 <paramdef>const GLdouble * <parameter>v</parameter></paramdef>
129 </funcprototype>
130 </funcsynopsis>
131 <funcsynopsis>
132 <funcprototype>
133 <funcdef>void <function>glSecondaryColor3ubv</function></funcdef>
134 <paramdef>const GLubyte * <parameter>v</parameter></paramdef>
135 </funcprototype>
136 </funcsynopsis>
137 <funcsynopsis>
138 <funcprototype>
139 <funcdef>void <function>glSecondaryColor3usv</function></funcdef>
140 <paramdef>const GLushort * <parameter>v</parameter></paramdef>
141 </funcprototype>
142 </funcsynopsis>
143 <funcsynopsis>
144 <funcprototype>
145 <funcdef>void <function>glSecondaryColor3uiv</function></funcdef>
146 <paramdef>const GLuint * <parameter>v</parameter></paramdef>
147 </funcprototype>
148 </funcsynopsis>
149 </refsynopsisdiv>
150 <refsect1 id="parameters2"><title>Parameters</title>
151 <variablelist>
152 <varlistentry>
153 <term><parameter>v</parameter></term>
154 <listitem>
155 <para>
156 Specifies a pointer to an array that contains red, green, blue.
157 </para>
158 </listitem>
159 </varlistentry>
160 </variablelist>
161 </refsect1>
162 <refsect1 id="description"><title>Description</title>
163 <para>
164 The GL stores both a primary four-valued RGBA color and a
165 secondary four-valued RGBA color (where alpha is always set to 0.0) that is
166 associated with every vertex.
167 </para>
168 <para>
169 The secondary color is interpolated and applied to each fragment during
170 rasterization when <constant>GL_COLOR_SUM</constant> is enabled. When lighting is enabled,
171 and <constant>GL_SEPARATE_SPECULAR_COLOR</constant> is specified, the value of the
172 secondary color is assigned the value computed from the specular term of
173 the lighting computation. Both the primary and secondary current colors are
174 applied to each fragment, regardless of the state of <constant>GL_COLOR_SUM</constant>,
175 under such conditions. When <constant>GL_SEPARATE_SPECULAR_COLOR</constant> is specified,
176 the value returned from querying the current secondary color is undefined.
177 </para>
178 <para>
179 <function>glSecondaryColor3b</function>, <function>glSecondaryColor3s</function>, and
180 <function>glSecondaryColor3i</function> take three signed byte, short, or long integers as
181 arguments. When <emphasis role="bold">v</emphasis> is appended to the name, the color commands can
182 take a pointer to an array of such values.
183 </para>
184 <para>
185 Color values are stored in floating-point format, with
186 unspecified mantissa and exponent sizes. Unsigned integer color
187 components, when specified, are linearly mapped to floating-point values
188 such that the largest representable value maps to 1.0 (full intensity), and
189 0 maps to 0.0 (zero intensity). Signed integer color components, when
190 specified, are linearly mapped to floating-point values such that the most
191 positive representable value maps to 1.0, and the most negative
192 representable value maps to
193 <inlineequation><mml:math>
194 <!-- eqn: -1.0:-->
195 <mml:mn>-1.0</mml:mn>
196 </mml:math></inlineequation>.
197 (Note that this mapping does not convert
198 0 precisely to 0.0). Floating-point values are mapped directly.
199 </para>
200 <para>
201 Neither floating-point nor signed integer values are clamped to the range
202 <inlineequation><mml:math>
203 <!-- eqn: [0,1]:-->
204 <mml:mfenced open="[" close="]">
205 <mml:mn>0</mml:mn>
206 <mml:mn>1</mml:mn>
207 </mml:mfenced>
208 </mml:math></inlineequation>
209 before the current color is updated. However, color components are
210 clamped to this range before they are interpolated or written into a color
211 buffer.
212 </para>
213 </refsect1>
214 <refsect1 id="notes"><title>Notes</title>
215 <para>
216 <function>glSecondaryColor</function> is available only if the GL version is 1.4 or greater.
217 </para>
218 <para>
219 The initial value for the secondary color is (0, 0, 0, 0).
220 </para>
221 <para>
222 The secondary color can be updated at any time. In particular, <function>glSecondaryColor</function> can
223 be called between a call to <citerefentry><refentrytitle>glBegin</refentrytitle></citerefentry> and the corresponding call to
224 <citerefentry><refentrytitle>glEnd</refentrytitle></citerefentry>.
225 </para>
226 </refsect1>
227 <refsect1 id="associatedgets"><title>Associated Gets</title>
228 <para>
229 <citerefentry><refentrytitle>glGet</refentrytitle></citerefentry> with argument <constant>GL_CURRENT_SECONDARY_COLOR</constant>
230 </para>
231 <para>
232 <citerefentry><refentrytitle>glGet</refentrytitle></citerefentry> with argument <constant>GL_RGBA_MODE</constant>
233 </para>
234 <para>
235 <citerefentry><refentrytitle>glIsEnabled</refentrytitle></citerefentry> with argument <constant>GL_COLOR_SUM</constant>
236 </para>
237 </refsect1>
238 <refsect1 id="seealso"><title>See Also</title>
239 <para>
240 <citerefentry><refentrytitle>glColor</refentrytitle></citerefentry>,
241 <citerefentry><refentrytitle>glIndex</refentrytitle></citerefentry>,
242 <citerefentry><refentrytitle>glIsEnabled</refentrytitle></citerefentry>,
243 <citerefentry><refentrytitle>glLightModel</refentrytitle></citerefentry>,
244 <function>glSecondaryColorPointer</function>
245 </para>
246 </refsect1>
247 <refsect1 id="Copyright"><title>Copyright</title>
248 <para>
249 Copyright <trademark class="copyright"></trademark> 1991-2006
250 Silicon Graphics, Inc. This document is licensed under the SGI
251 Free Software B License. For details, see
252 <ulink url="http://oss.sgi.com/projects/FreeB/">http://oss.sgi.com/projects/FreeB/</ulink>.
253 </para>
254 </refsect1>
255</refentry>