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>glMap1</title><meta name="generator" content="DocBook XSL Stylesheets V1.73.2" /></head><body><div class="refentry" lang="en" xml:lang="en"><a id="glMap1"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>glMap1 — define a one-dimensional evaluator</p></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">glMap1f</b>(</code></td><td>GLenum </td><td><var class="pdparam">target</var>, </td></tr><tr><td> </td><td>GLfloat </td><td><var class="pdparam">u1</var>, </td></tr><tr><td> </td><td>GLfloat </td><td><var class="pdparam">u2</var>, </td></tr><tr><td> </td><td>GLint </td><td><var class="pdparam">stride</var>, </td></tr><tr><td> </td><td>GLint </td><td><var class="pdparam">order</var>, </td></tr><tr><td> </td><td>const GLfloat * </td><td><var class="pdparam">points</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">glMap1d</b>(</code></td><td>GLenum </td><td><var class="pdparam">target</var>, </td></tr><tr><td> </td><td>GLdouble </td><td><var class="pdparam">u1</var>, </td></tr><tr><td> </td><td>GLdouble </td><td><var class="pdparam">u2</var>, </td></tr><tr><td> </td><td>GLint </td><td><var class="pdparam">stride</var>, </td></tr><tr><td> </td><td>GLint </td><td><var class="pdparam">order</var>, </td></tr><tr><td> </td><td>const GLdouble * </td><td><var class="pdparam">points</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>target</code></em></span></dt><dd><p> | |
4 | Specifies the kind of values that are generated by the evaluator. | |
5 | Symbolic constants | |
6 | <code class="constant">GL_MAP1_VERTEX_3</code>, | |
7 | <code class="constant">GL_MAP1_VERTEX_4</code>, | |
8 | <code class="constant">GL_MAP1_INDEX</code>, | |
9 | <code class="constant">GL_MAP1_COLOR_4</code>, | |
10 | <code class="constant">GL_MAP1_NORMAL</code>, | |
11 | <code class="constant">GL_MAP1_TEXTURE_COORD_1</code>, | |
12 | <code class="constant">GL_MAP1_TEXTURE_COORD_2</code>, | |
13 | <code class="constant">GL_MAP1_TEXTURE_COORD_3</code>, and | |
14 | <code class="constant">GL_MAP1_TEXTURE_COORD_4</code> are accepted. | |
15 | </p></dd><dt><span class="term"><em class="parameter"><code>u1</code></em>, </span><span class="term"><em class="parameter"><code>u2</code></em></span></dt><dd><p> | |
16 | Specify a linear mapping of | |
17 | <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll"><mml:mi mathvariant="italic">u</mml:mi></mml:math>, | |
18 | as presented to <a class="citerefentry" href="glEvalCoord1.xml"><span class="citerefentry"><span class="refentrytitle">glEvalCoord1</span></span></a>, | |
19 | to | |
20 | <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll"> | |
21 | ||
22 | <mml:mover><mml:mi mathvariant="italic">u</mml:mi><mml:mo>̂</mml:mo></mml:mover> | |
23 | </mml:math>, | |
24 | the variable that is evaluated by the equations specified by this command. | |
25 | </p></dd><dt><span class="term"><em class="parameter"><code>stride</code></em></span></dt><dd><p> | |
26 | Specifies the number of floats or doubles between | |
27 | the beginning of one control point and the beginning of the next one | |
28 | in the data structure referenced in <em class="parameter"><code>points</code></em>. | |
29 | This allows control points to be embedded in arbitrary data structures. | |
30 | The only constraint is that the values for a particular control point | |
31 | must occupy contiguous memory locations. | |
32 | </p></dd><dt><span class="term"><em class="parameter"><code>order</code></em></span></dt><dd><p> | |
33 | Specifies the number of control points. | |
34 | Must be positive. | |
35 | </p></dd><dt><span class="term"><em class="parameter"><code>points</code></em></span></dt><dd><p> | |
36 | Specifies a pointer to the array of control points. | |
37 | </p></dd></dl></div></div><div class="refsect1" lang="en" xml:lang="en"><a id="description"></a><h2>Description</h2><p> | |
38 | Evaluators provide a way to use polynomial or rational polynomial mapping | |
39 | to produce vertices, | |
40 | normals, | |
41 | texture coordinates, | |
42 | and colors. | |
43 | The values produced by an evaluator are sent to further stages | |
44 | of GL processing just as if they had been presented using | |
45 | <a class="citerefentry" href="glVertex.xml"><span class="citerefentry"><span class="refentrytitle">glVertex</span></span></a>, | |
46 | <a class="citerefentry" href="glNormal.xml"><span class="citerefentry"><span class="refentrytitle">glNormal</span></span></a>, | |
47 | <a class="citerefentry" href="glTexCoord.xml"><span class="citerefentry"><span class="refentrytitle">glTexCoord</span></span></a>, and | |
48 | <a class="citerefentry" href="glColor.xml"><span class="citerefentry"><span class="refentrytitle">glColor</span></span></a> commands, | |
49 | except that the generated values do not update the current normal, | |
50 | texture coordinates, | |
51 | or color. | |
52 | </p><p> | |
53 | All polynomial or rational polynomial splines of any degree | |
54 | (up to the maximum degree supported by the GL implementation) | |
55 | can be described using evaluators. | |
56 | These include almost all splines used in computer graphics: B-splines, | |
57 | Bezier curves, Hermite splines, and so on. | |
58 | </p><p> | |
59 | Evaluators define curves based on Bernstein polynomials. | |
60 | Define | |
61 | <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll"> | |
62 | ||
63 | <mml:mrow> | |
64 | <mml:mi mathvariant="italic">p</mml:mi> | |
65 | <mml:mo></mml:mo> | |
66 | <mml:mfenced open="(" close=")"> | |
67 | <mml:mover><mml:mi mathvariant="italic">u</mml:mi><mml:mo>̂</mml:mo></mml:mover> | |
68 | </mml:mfenced> | |
69 | </mml:mrow> | |
70 | </mml:math> | |
71 | as | |
72 | </p><p> | |
73 | </p><div class="informalequation"><mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll"> | |
74 | ||
75 | <mml:mrow> | |
76 | <mml:mrow> | |
77 | <mml:mi mathvariant="italic">p</mml:mi> | |
78 | <mml:mo></mml:mo> | |
79 | <mml:mfenced open="(" close=")"> | |
80 | <mml:mover><mml:mi mathvariant="italic">u</mml:mi><mml:mo>̂</mml:mo></mml:mover> | |
81 | </mml:mfenced> | |
82 | </mml:mrow> | |
83 | <mml:mo>=</mml:mo> | |
84 | <mml:mrow> | |
85 | <mml:munderover> | |
86 | <mml:mo>Σ</mml:mo> | |
87 | <mml:mrow> | |
88 | <mml:mi mathvariant="italic">i</mml:mi> | |
89 | <mml:mo>=</mml:mo> | |
90 | <mml:mn>0</mml:mn> | |
91 | </mml:mrow> | |
92 | <mml:mi mathvariant="italic">n</mml:mi> | |
93 | </mml:munderover> | |
94 | <mml:mrow> | |
95 | <mml:mrow> | |
96 | <mml:msup><mml:mfenced open="" close=""> | |
97 | <mml:msub><mml:mi mathvariant="italic">B</mml:mi> | |
98 | <mml:mi mathvariant="italic">i</mml:mi> | |
99 | </mml:msub> | |
100 | </mml:mfenced> | |
101 | <mml:mi mathvariant="italic">n</mml:mi> | |
102 | </mml:msup> | |
103 | <mml:mo></mml:mo> | |
104 | <mml:mfenced open="(" close=")"> | |
105 | <mml:mover><mml:mi mathvariant="italic">u</mml:mi><mml:mo>̂</mml:mo></mml:mover> | |
106 | </mml:mfenced> | |
107 | </mml:mrow> | |
108 | <mml:mo></mml:mo> | |
109 | <mml:msub><mml:mi mathvariant="italic">R</mml:mi> | |
110 | <mml:mi mathvariant="italic">i</mml:mi> | |
111 | </mml:msub> | |
112 | </mml:mrow> | |
113 | </mml:mrow> | |
114 | </mml:mrow> | |
115 | </mml:math></div><p> | |
116 | </p><p> | |
117 | </p><p> | |
118 | where | |
119 | <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll"> | |
120 | ||
121 | <mml:msub><mml:mi mathvariant="italic">R</mml:mi> | |
122 | <mml:mi mathvariant="italic">i</mml:mi> | |
123 | </mml:msub> | |
124 | </mml:math> | |
125 | is a control point and | |
126 | <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll"> | |
127 | ||
128 | <mml:mrow> | |
129 | <mml:msup><mml:mfenced open="" close=""> | |
130 | <mml:msub><mml:mi mathvariant="italic">B</mml:mi> | |
131 | <mml:mi mathvariant="italic">i</mml:mi> | |
132 | </mml:msub> | |
133 | </mml:mfenced> | |
134 | <mml:mi mathvariant="italic">n</mml:mi> | |
135 | </mml:msup> | |
136 | <mml:mo></mml:mo> | |
137 | <mml:mfenced open="(" close=")"> | |
138 | <mml:mover><mml:mi mathvariant="italic">u</mml:mi><mml:mo>̂</mml:mo></mml:mover> | |
139 | </mml:mfenced> | |
140 | </mml:mrow> | |
141 | </mml:math> | |
142 | is the | |
143 | <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll"><mml:mi mathvariant="italic">i</mml:mi></mml:math>th | |
144 | Bernstein polynomial of degree | |
145 | <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll"><mml:mi mathvariant="italic">n</mml:mi></mml:math> | |
146 | (<em class="parameter"><code>order</code></em> = | |
147 | <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll"> | |
148 | ||
149 | <mml:mrow> | |
150 | <mml:mi mathvariant="italic">n</mml:mi> | |
151 | <mml:mo>+</mml:mo> | |
152 | <mml:mn>1</mml:mn> | |
153 | </mml:mrow> | |
154 | </mml:math>): | |
155 | </p><p> | |
156 | <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll"> | |
157 | ||
158 | <mml:mrow> | |
159 | <mml:mrow> | |
160 | <mml:msup><mml:mfenced open="" close=""> | |
161 | <mml:msub><mml:mi mathvariant="italic">B</mml:mi> | |
162 | <mml:mi mathvariant="italic">i</mml:mi> | |
163 | </mml:msub> | |
164 | </mml:mfenced> | |
165 | <mml:mi mathvariant="italic">n</mml:mi> | |
166 | </mml:msup> | |
167 | <mml:mo></mml:mo> | |
168 | <mml:mfenced open="(" close=")"> | |
169 | <mml:mover><mml:mi mathvariant="italic">u</mml:mi><mml:mo>̂</mml:mo></mml:mover> | |
170 | </mml:mfenced> | |
171 | </mml:mrow> | |
172 | <mml:mo>=</mml:mo> | |
173 | <mml:mrow> | |
174 | <mml:mfenced open="(" close=")"> | |
175 | <mml:mfenced open="" close=""> | |
176 | <mml:mtable> | |
177 | <mml:mtr><mml:mtd> | |
178 | <mml:mi mathvariant="italic">n</mml:mi> | |
179 | </mml:mtd></mml:mtr> | |
180 | <mml:mtr><mml:mtd> | |
181 | <mml:mi mathvariant="italic">i</mml:mi> | |
182 | </mml:mtd></mml:mtr> | |
183 | </mml:mtable> | |
184 | </mml:mfenced> | |
185 | </mml:mfenced> | |
186 | <mml:mo></mml:mo> | |
187 | <mml:msup><mml:mfenced open="" close=""> | |
188 | <mml:mover><mml:mi mathvariant="italic">u</mml:mi><mml:mo>̂</mml:mo></mml:mover> | |
189 | </mml:mfenced> | |
190 | <mml:mi mathvariant="italic">i</mml:mi> | |
191 | </mml:msup> | |
192 | <mml:mo></mml:mo> | |
193 | <mml:mfenced open="" close=""> | |
194 | <mml:msup><mml:mfenced open="(" close=")"> | |
195 | <mml:mrow> | |
196 | <mml:mn>1</mml:mn> | |
197 | <mml:mo>-</mml:mo> | |
198 | <mml:mover><mml:mi mathvariant="italic">u</mml:mi><mml:mo>̂</mml:mo></mml:mover> | |
199 | </mml:mrow> | |
200 | </mml:mfenced> | |
201 | <mml:mfenced open="" close=""> | |
202 | <mml:mrow> | |
203 | <mml:mi mathvariant="italic">n</mml:mi> | |
204 | <mml:mo>-</mml:mo> | |
205 | <mml:mi mathvariant="italic">i</mml:mi> | |
206 | </mml:mrow> | |
207 | </mml:mfenced> | |
208 | </mml:msup> | |
209 | </mml:mfenced> | |
210 | </mml:mrow> | |
211 | </mml:mrow> | |
212 | </mml:math> | |
213 | </p><p> | |
214 | Recall that | |
215 | </p><p> | |
216 | <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll"> | |
217 | ||
218 | <mml:mrow> | |
219 | <mml:msup><mml:mn>0</mml:mn> | |
220 | <mml:mn>0</mml:mn> | |
221 | </mml:msup> | |
222 | <mml:mo>==</mml:mo> | |
223 | <mml:mn>1</mml:mn> | |
224 | </mml:mrow> | |
225 | </mml:math> | |
226 | and | |
227 | <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll"> | |
228 | ||
229 | <mml:mrow> | |
230 | <mml:mfenced open="(" close=")"> | |
231 | <mml:mfenced open="" close=""> | |
232 | <mml:mtable> | |
233 | <mml:mtr><mml:mtd> | |
234 | <mml:mi mathvariant="italic">n</mml:mi> | |
235 | </mml:mtd></mml:mtr> | |
236 | <mml:mtr><mml:mtd> | |
237 | <mml:mn>0</mml:mn> | |
238 | </mml:mtd></mml:mtr> | |
239 | </mml:mtable> | |
240 | </mml:mfenced> | |
241 | </mml:mfenced> | |
242 | <mml:mo>==</mml:mo> | |
243 | <mml:mn>1</mml:mn> | |
244 | </mml:mrow> | |
245 | </mml:math> | |
246 | </p><p> | |
247 | <code class="function">glMap1</code> is used to define the basis and to specify what kind of values | |
248 | are produced. | |
249 | Once defined, | |
250 | a map can be enabled and disabled by calling <a class="citerefentry" href="glEnable.xml"><span class="citerefentry"><span class="refentrytitle">glEnable</span></span></a> and <a class="citerefentry" href="glDisable.xml"><span class="citerefentry"><span class="refentrytitle">glDisable</span></span></a> | |
251 | with the map name, one of the nine predefined values for <em class="parameter"><code>target</code></em> | |
252 | described below. | |
253 | <a class="citerefentry" href="glEvalCoord1.xml"><span class="citerefentry"><span class="refentrytitle">glEvalCoord1</span></span></a> evaluates the one-dimensional maps that are enabled. | |
254 | When | |
255 | <a class="citerefentry" href="glEvalCoord1.xml"><span class="citerefentry"><span class="refentrytitle">glEvalCoord1</span></span></a> presents a value | |
256 | <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll"><mml:mi mathvariant="italic">u</mml:mi></mml:math>, | |
257 | the Bernstein functions are evaluated using | |
258 | <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll"> | |
259 | ||
260 | <mml:mover><mml:mi mathvariant="italic">u</mml:mi><mml:mo>̂</mml:mo></mml:mover> | |
261 | </mml:math>, | |
262 | where | |
263 | <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll"> | |
264 | ||
265 | <mml:mrow> | |
266 | <mml:mover><mml:mi mathvariant="italic">u</mml:mi><mml:mo>̂</mml:mo></mml:mover> | |
267 | <mml:mo>=</mml:mo> | |
268 | <mml:mfrac> | |
269 | <mml:mfenced open="" close=""> | |
270 | <mml:mrow> | |
271 | <mml:mi mathvariant="italic">u</mml:mi> | |
272 | <mml:mo>-</mml:mo> | |
273 | <mml:mi mathvariant="italic">u1</mml:mi> | |
274 | </mml:mrow> | |
275 | </mml:mfenced> | |
276 | <mml:mfenced open="" close=""> | |
277 | <mml:mrow> | |
278 | <mml:mi mathvariant="italic">u2</mml:mi> | |
279 | <mml:mo>-</mml:mo> | |
280 | <mml:mi mathvariant="italic">u1</mml:mi> | |
281 | </mml:mrow> | |
282 | </mml:mfenced> | |
283 | </mml:mfrac> | |
284 | </mml:mrow> | |
285 | </mml:math> | |
286 | </p><p> | |
287 | <em class="parameter"><code>target</code></em> is a symbolic constant that indicates what kind of control points | |
288 | are provided in <em class="parameter"><code>points</code></em>, | |
289 | and what output is generated when the map is evaluated. | |
290 | It can assume one of nine predefined values: | |
291 | </p><div class="variablelist"><dl><dt><span class="term"><code class="constant">GL_MAP1_VERTEX_3</code></span></dt><dd><p> | |
292 | Each control point is three floating-point values representing | |
293 | <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll"><mml:mi mathvariant="italic">x</mml:mi></mml:math>, | |
294 | <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll"><mml:mi mathvariant="italic">y</mml:mi></mml:math>, | |
295 | and | |
296 | <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll"><mml:mi mathvariant="italic">z</mml:mi></mml:math>. | |
297 | Internal <a class="citerefentry" href="glVertex3.xml"><span class="citerefentry"><span class="refentrytitle">glVertex3</span></span></a> commands are generated when the map is evaluated. | |
298 | </p></dd><dt><span class="term"><code class="constant">GL_MAP1_VERTEX_4</code></span></dt><dd><p> | |
299 | Each control point is four floating-point values representing | |
300 | <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll"><mml:mi mathvariant="italic">x</mml:mi></mml:math>, | |
301 | <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll"><mml:mi mathvariant="italic">y</mml:mi></mml:math>, | |
302 | <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll"><mml:mi mathvariant="italic">z</mml:mi></mml:math>, | |
303 | and | |
304 | <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll"><mml:mi mathvariant="italic">w</mml:mi></mml:math>. | |
305 | Internal <a class="citerefentry" href="glVertex4.xml"><span class="citerefentry"><span class="refentrytitle">glVertex4</span></span></a> commands are generated when the map is evaluated. | |
306 | </p></dd><dt><span class="term"><code class="constant">GL_MAP1_INDEX</code></span></dt><dd><p> | |
307 | Each control point is a single floating-point value representing a color index. | |
308 | Internal <a class="citerefentry" href="glIndex.xml"><span class="citerefentry"><span class="refentrytitle">glIndex</span></span></a> commands are generated when the map is evaluated | |
309 | but the current index is not updated with the value of these <a class="citerefentry" href="glIndex.xml"><span class="citerefentry"><span class="refentrytitle">glIndex</span></span></a> | |
310 | commands. | |
311 | </p></dd><dt><span class="term"><code class="constant">GL_MAP1_COLOR_4</code></span></dt><dd><p> | |
312 | Each control point is four floating-point values representing | |
313 | red, green, blue, and alpha. | |
314 | Internal <a class="citerefentry" href="glColor4.xml"><span class="citerefentry"><span class="refentrytitle">glColor4</span></span></a> commands are generated when the map is | |
315 | evaluated but the current color is not updated with the value of these | |
316 | <a class="citerefentry" href="glColor4.xml"><span class="citerefentry"><span class="refentrytitle">glColor4</span></span></a> commands. | |
317 | </p></dd><dt><span class="term"><code class="constant">GL_MAP1_NORMAL</code></span></dt><dd><p> | |
318 | Each control point is three floating-point values representing | |
319 | the | |
320 | <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll"><mml:mi mathvariant="italic">x</mml:mi></mml:math>, | |
321 | <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll"><mml:mi mathvariant="italic">y</mml:mi></mml:math>, | |
322 | and | |
323 | <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll"><mml:mi mathvariant="italic">z</mml:mi></mml:math> | |
324 | components of a normal vector. | |
325 | Internal <a class="citerefentry" href="glNormal.xml"><span class="citerefentry"><span class="refentrytitle">glNormal</span></span></a> commands are generated when the map is | |
326 | evaluated but the current normal is not updated with the value of | |
327 | these <a class="citerefentry" href="glNormal.xml"><span class="citerefentry"><span class="refentrytitle">glNormal</span></span></a> commands. | |
328 | </p></dd><dt><span class="term"><code class="constant">GL_MAP1_TEXTURE_COORD_1</code></span></dt><dd><p> | |
329 | Each control point is a single floating-point value representing | |
330 | the | |
331 | <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll"><mml:mi mathvariant="italic">s</mml:mi></mml:math> | |
332 | texture coordinate. | |
333 | Internal | |
334 | <a class="citerefentry" href="glTexCoord1.xml"><span class="citerefentry"><span class="refentrytitle">glTexCoord1</span></span></a> commands are generated when the map is | |
335 | evaluated but the current texture coordinates are not updated with the value | |
336 | of these <a class="citerefentry" href="glTexCoord.xml"><span class="citerefentry"><span class="refentrytitle">glTexCoord</span></span></a> commands. | |
337 | </p></dd><dt><span class="term"><code class="constant">GL_MAP1_TEXTURE_COORD_2</code></span></dt><dd><p> | |
338 | Each control point is two floating-point values representing | |
339 | the | |
340 | <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll"><mml:mi mathvariant="italic">s</mml:mi></mml:math> | |
341 | and | |
342 | <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll"><mml:mi mathvariant="italic">t</mml:mi></mml:math> | |
343 | texture coordinates. | |
344 | Internal | |
345 | <a class="citerefentry" href="glTexCoord2.xml"><span class="citerefentry"><span class="refentrytitle">glTexCoord2</span></span></a> commands are generated when the map is | |
346 | evaluated but the current texture coordinates are not updated with the value | |
347 | of these <a class="citerefentry" href="glTexCoord.xml"><span class="citerefentry"><span class="refentrytitle">glTexCoord</span></span></a> commands. | |
348 | </p></dd><dt><span class="term"><code class="constant">GL_MAP1_TEXTURE_COORD_3</code></span></dt><dd><p> | |
349 | Each control point is three floating-point values representing | |
350 | the | |
351 | <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll"><mml:mi mathvariant="italic">s</mml:mi></mml:math>, | |
352 | <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll"><mml:mi mathvariant="italic">t</mml:mi></mml:math>, | |
353 | and | |
354 | <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll"><mml:mi mathvariant="italic">r</mml:mi></mml:math> | |
355 | texture coordinates. | |
356 | Internal <a class="citerefentry" href="glTexCoord3.xml"><span class="citerefentry"><span class="refentrytitle">glTexCoord3</span></span></a> commands are generated when the map is | |
357 | evaluated but the current texture coordinates are not updated with the value | |
358 | of these <a class="citerefentry" href="glTexCoord.xml"><span class="citerefentry"><span class="refentrytitle">glTexCoord</span></span></a> commands. | |
359 | </p></dd><dt><span class="term"><code class="constant">GL_MAP1_TEXTURE_COORD_4</code></span></dt><dd><p> | |
360 | Each control point is four floating-point values representing | |
361 | the | |
362 | <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll"><mml:mi mathvariant="italic">s</mml:mi></mml:math>, | |
363 | <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll"><mml:mi mathvariant="italic">t</mml:mi></mml:math>, | |
364 | <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll"><mml:mi mathvariant="italic">r</mml:mi></mml:math>, | |
365 | and | |
366 | <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll"><mml:mi mathvariant="italic">q</mml:mi></mml:math> | |
367 | texture coordinates. | |
368 | Internal | |
369 | <a class="citerefentry" href="glTexCoord4.xml"><span class="citerefentry"><span class="refentrytitle">glTexCoord4</span></span></a> commands are generated when the map is evaluated but | |
370 | the current texture coordinates are not updated with the value | |
371 | of these <a class="citerefentry" href="glTexCoord.xml"><span class="citerefentry"><span class="refentrytitle">glTexCoord</span></span></a> commands. | |
372 | </p></dd></dl></div><p> | |
373 | <em class="parameter"><code>stride</code></em>, | |
374 | <em class="parameter"><code>order</code></em>, and | |
375 | <em class="parameter"><code>points</code></em> define the array addressing for accessing the control points. | |
376 | <em class="parameter"><code>points</code></em> is the location of the first control point, | |
377 | which occupies one, two, three, or four contiguous memory locations, | |
378 | depending on which map is being defined. | |
379 | <em class="parameter"><code>order</code></em> is the number of control points in the array. | |
380 | <em class="parameter"><code>stride</code></em> specifies how many float or double locations to advance the internal | |
381 | memory pointer to reach the next control point. | |
382 | </p></div><div class="refsect1" lang="en" xml:lang="en"><a id="notes"></a><h2>Notes</h2><p> | |
383 | As is the case with all GL commands that accept pointers to data, | |
384 | it is as if the contents of <em class="parameter"><code>points</code></em> were copied by <code class="function">glMap1</code> before <code class="function">glMap1</code> | |
385 | returns. | |
386 | Changes to the contents of <em class="parameter"><code>points</code></em> have no effect after <code class="function">glMap1</code> is called. | |
387 | </p></div><div class="refsect1" lang="en" xml:lang="en"><a id="errors"></a><h2>Errors</h2><p> | |
388 | <code class="constant">GL_INVALID_ENUM</code> is generated if <em class="parameter"><code>target</code></em> is not an accepted value. | |
389 | </p><p> | |
390 | <code class="constant">GL_INVALID_VALUE</code> is generated if <em class="parameter"><code>u1</code></em> is equal to <em class="parameter"><code>u2</code></em>. | |
391 | </p><p> | |
392 | <code class="constant">GL_INVALID_VALUE</code> is generated if <em class="parameter"><code>stride</code></em> is less than the number | |
393 | of values in a control point. | |
394 | </p><p> | |
395 | <code class="constant">GL_INVALID_VALUE</code> is generated if <em class="parameter"><code>order</code></em> is less than 1 or | |
396 | greater than the return value of <code class="constant">GL_MAX_EVAL_ORDER</code>. | |
397 | </p><p> | |
398 | <code class="constant">GL_INVALID_OPERATION</code> is generated if <code class="function">glMap1</code> | |
399 | is executed between the execution of | |
400 | <a class="citerefentry" href="glBegin.xml"><span class="citerefentry"><span class="refentrytitle">glBegin</span></span></a> | |
401 | and the corresponding execution of <a class="citerefentry" href="glEnd.xml"><span class="citerefentry"><span class="refentrytitle">glEnd</span></span></a>. | |
402 | </p><p> | |
403 | <code class="constant">GL_INVALID_OPERATION</code> is generated if <code class="function">glMap1</code> is called and the value | |
404 | of <code class="constant">GL_ACTIVE_TEXTURE</code> is not <code class="constant">GL_TEXTURE0</code>. | |
405 | </p></div><div class="refsect1" lang="en" xml:lang="en"><a id="associatedgets"></a><h2>Associated Gets</h2><p> | |
406 | <a class="citerefentry" href="glGetMap.xml"><span class="citerefentry"><span class="refentrytitle">glGetMap</span></span></a> | |
407 | </p><p> | |
408 | <a class="citerefentry" href="glGet.xml"><span class="citerefentry"><span class="refentrytitle">glGet</span></span></a> with argument <code class="constant">GL_MAX_EVAL_ORDER</code> | |
409 | </p><p> | |
410 | <a class="citerefentry" href="glIsEnabled.xml"><span class="citerefentry"><span class="refentrytitle">glIsEnabled</span></span></a> with argument <code class="constant">GL_MAP1_VERTEX_3</code> | |
411 | </p><p> | |
412 | <a class="citerefentry" href="glIsEnabled.xml"><span class="citerefentry"><span class="refentrytitle">glIsEnabled</span></span></a> with argument <code class="constant">GL_MAP1_VERTEX_4</code> | |
413 | </p><p> | |
414 | <a class="citerefentry" href="glIsEnabled.xml"><span class="citerefentry"><span class="refentrytitle">glIsEnabled</span></span></a> with argument <code class="constant">GL_MAP1_INDEX</code> | |
415 | </p><p> | |
416 | <a class="citerefentry" href="glIsEnabled.xml"><span class="citerefentry"><span class="refentrytitle">glIsEnabled</span></span></a> with argument <code class="constant">GL_MAP1_COLOR_4</code> | |
417 | </p><p> | |
418 | <a class="citerefentry" href="glIsEnabled.xml"><span class="citerefentry"><span class="refentrytitle">glIsEnabled</span></span></a> with argument <code class="constant">GL_MAP1_NORMAL</code> | |
419 | </p><p> | |
420 | <a class="citerefentry" href="glIsEnabled.xml"><span class="citerefentry"><span class="refentrytitle">glIsEnabled</span></span></a> with argument <code class="constant">GL_MAP1_TEXTURE_COORD_1</code> | |
421 | </p><p> | |
422 | <a class="citerefentry" href="glIsEnabled.xml"><span class="citerefentry"><span class="refentrytitle">glIsEnabled</span></span></a> with argument <code class="constant">GL_MAP1_TEXTURE_COORD_2</code> | |
423 | </p><p> | |
424 | <a class="citerefentry" href="glIsEnabled.xml"><span class="citerefentry"><span class="refentrytitle">glIsEnabled</span></span></a> with argument <code class="constant">GL_MAP1_TEXTURE_COORD_3</code> | |
425 | </p><p> | |
426 | <a class="citerefentry" href="glIsEnabled.xml"><span class="citerefentry"><span class="refentrytitle">glIsEnabled</span></span></a> with argument <code class="constant">GL_MAP1_TEXTURE_COORD_4</code> | |
427 | </p></div><div class="refsect1" lang="en" xml:lang="en"><a id="seealso"></a><h2>See Also</h2><p> | |
428 | <a class="citerefentry" href="glBegin.xml"><span class="citerefentry"><span class="refentrytitle">glBegin</span></span></a>, | |
429 | <a class="citerefentry" href="glColor.xml"><span class="citerefentry"><span class="refentrytitle">glColor</span></span></a>, | |
430 | <a class="citerefentry" href="glEnable.xml"><span class="citerefentry"><span class="refentrytitle">glEnable</span></span></a>, | |
431 | <a class="citerefentry" href="glEvalCoord.xml"><span class="citerefentry"><span class="refentrytitle">glEvalCoord</span></span></a>, | |
432 | <a class="citerefentry" href="glEvalMesh.xml"><span class="citerefentry"><span class="refentrytitle">glEvalMesh</span></span></a>, | |
433 | <a class="citerefentry" href="glEvalPoint.xml"><span class="citerefentry"><span class="refentrytitle">glEvalPoint</span></span></a>, | |
434 | <a class="citerefentry" href="glMap2.xml"><span class="citerefentry"><span class="refentrytitle">glMap2</span></span></a>, | |
435 | <a class="citerefentry" href="glMapGrid.xml"><span class="citerefentry"><span class="refentrytitle">glMapGrid</span></span></a>, | |
436 | <a class="citerefentry" href="glNormal.xml"><span class="citerefentry"><span class="refentrytitle">glNormal</span></span></a>, | |
437 | <a class="citerefentry" href="glTexCoord.xml"><span class="citerefentry"><span class="refentrytitle">glTexCoord</span></span></a>, | |
438 | <a class="citerefentry" href="glVertex.xml"><span class="citerefentry"><span class="refentrytitle">glVertex</span></span></a> | |
439 | </p></div><div class="refsect1" lang="en" xml:lang="en"><a id="Copyright"></a><h2>Copyright</h2><p> | |
440 | Copyright <span class="trademark"></span>© 1991-2006 | |
441 | Silicon Graphics, Inc. This document is licensed under the SGI | |
442 | Free Software B License. For details, see | |
443 | <a class="ulink" href="http://oss.sgi.com/projects/FreeB/" target="_top">http://oss.sgi.com/projects/FreeB/</a>. | |
444 | </p></div></div></body></html> |