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>glMap2
</title><meta name=
"generator" content=
"DocBook XSL Stylesheets V1.73.2" /></head><body><div class=
"refentry" lang=
"en" xml:
lang=
"en"><a id=
"glMap2"></a><div class=
"titlepage"></div><div class=
"refnamediv"><h2>Name
</h2><p>glMap2 — define a two-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">glMap2f
</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">ustride
</var>,
</td></tr><tr><td> </td><td>GLint
</td><td><var class=
"pdparam">uorder
</var>,
</td></tr><tr><td> </td><td>GLfloat
</td><td><var class=
"pdparam">v1
</var>,
</td></tr><tr><td> </td><td>GLfloat
</td><td><var class=
"pdparam">v2
</var>,
</td></tr><tr><td> </td><td>GLint
</td><td><var class=
"pdparam">vstride
</var>,
</td></tr><tr><td> </td><td>GLint
</td><td><var class=
"pdparam">vorder
</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">glMap2d
</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">ustride
</var>,
</td></tr><tr><td> </td><td>GLint
</td><td><var class=
"pdparam">uorder
</var>,
</td></tr><tr><td> </td><td>GLdouble
</td><td><var class=
"pdparam">v1
</var>,
</td></tr><tr><td> </td><td>GLdouble
</td><td><var class=
"pdparam">v2
</var>,
</td></tr><tr><td> </td><td>GLint
</td><td><var class=
"pdparam">vstride
</var>,
</td></tr><tr><td> </td><td>GLint
</td><td><var class=
"pdparam">vorder
</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.
6 <code class=
"constant">GL_MAP2_VERTEX_3
</code>,
7 <code class=
"constant">GL_MAP2_VERTEX_4
</code>,
8 <code class=
"constant">GL_MAP2_INDEX
</code>,
9 <code class=
"constant">GL_MAP2_COLOR_4
</code>,
10 <code class=
"constant">GL_MAP2_NORMAL
</code>,
11 <code class=
"constant">GL_MAP2_TEXTURE_COORD_1
</code>,
12 <code class=
"constant">GL_MAP2_TEXTURE_COORD_2
</code>,
13 <code class=
"constant">GL_MAP2_TEXTURE_COORD_3
</code>, and
14 <code class=
"constant">GL_MAP2_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=
"glEvalCoord2.xml"><span class=
"citerefentry"><span class=
"refentrytitle">glEvalCoord2
</span></span></a>,
20 <mml:math xmlns:
mml=
"http://www.w3.org/1998/Math/MathML" overflow=
"scroll">
22 <mml:mover><mml:mi mathvariant=
"italic">u
</mml:mi><mml:mo>̂
</mml:mo></mml:mover>
24 one of the two variables that are evaluated by the equations specified
25 by this command. Initially,
<em class=
"parameter"><code>u1
</code></em> is
0 and
<em class=
"parameter"><code>u2
</code></em> is
1.
26 </p></dd><dt><span class=
"term"><em class=
"parameter"><code>ustride
</code></em></span></dt><dd><p>
27 Specifies the number of floats or doubles between
28 the beginning of control point
29 <mml:math xmlns:
mml=
"http://www.w3.org/1998/Math/MathML" overflow=
"scroll">
31 <mml:msub><mml:mi mathvariant=
"italic">R
</mml:mi>
32 <mml:mi mathvariant=
"italic">ij
</mml:mi>
35 and the beginning of control point
36 <mml:math xmlns:
mml=
"http://www.w3.org/1998/Math/MathML" overflow=
"scroll">
38 <mml:msub><mml:mi mathvariant=
"italic">R
</mml:mi>
39 <mml:mfenced open=
"" close=
"">
41 <mml:mfenced open=
"(" close=
")">
43 <mml:mi mathvariant=
"italic">i
</mml:mi>
49 <mml:mi mathvariant=
"italic">j
</mml:mi>
55 <mml:math xmlns:
mml=
"http://www.w3.org/1998/Math/MathML" overflow=
"scroll"><mml:mi mathvariant=
"italic">i
</mml:mi></mml:math>
57 <mml:math xmlns:
mml=
"http://www.w3.org/1998/Math/MathML" overflow=
"scroll"><mml:mi mathvariant=
"italic">j
</mml:mi></mml:math>
59 <mml:math xmlns:
mml=
"http://www.w3.org/1998/Math/MathML" overflow=
"scroll"><mml:mi mathvariant=
"italic">u
</mml:mi></mml:math>
61 <mml:math xmlns:
mml=
"http://www.w3.org/1998/Math/MathML" overflow=
"scroll"><mml:mi mathvariant=
"italic">v
</mml:mi></mml:math>
62 control point indices, respectively.
63 This allows control points to be embedded in arbitrary data structures.
64 The only constraint is that the values for a particular control point
65 must occupy contiguous memory locations. The initial value of
<em class=
"parameter"><code>ustride
</code></em> is
0.
66 </p></dd><dt><span class=
"term"><em class=
"parameter"><code>uorder
</code></em></span></dt><dd><p>
67 Specifies the dimension of the control point array in the
68 <mml:math xmlns:
mml=
"http://www.w3.org/1998/Math/MathML" overflow=
"scroll"><mml:mi mathvariant=
"italic">u
</mml:mi></mml:math>
70 Must be positive. The initial value is
1.
71 </p></dd><dt><span class=
"term"><em class=
"parameter"><code>v1
</code></em>,
</span><span class=
"term"><em class=
"parameter"><code>v2
</code></em></span></dt><dd><p>
72 Specify a linear mapping of
73 <mml:math xmlns:
mml=
"http://www.w3.org/1998/Math/MathML" overflow=
"scroll"><mml:mi mathvariant=
"italic">v
</mml:mi></mml:math>,
74 as presented to
<a class=
"citerefentry" href=
"glEvalCoord2.xml"><span class=
"citerefentry"><span class=
"refentrytitle">glEvalCoord2
</span></span></a>,
76 <mml:math xmlns:
mml=
"http://www.w3.org/1998/Math/MathML" overflow=
"scroll">
78 <mml:mover><mml:mi mathvariant=
"italic">v
</mml:mi><mml:mo>̂
</mml:mo></mml:mover>
80 one of the two variables that are evaluated by the equations specified
81 by this command. Initially,
<em class=
"parameter"><code>v1
</code></em> is
0 and
<em class=
"parameter"><code>v2
</code></em> is
1.
82 </p></dd><dt><span class=
"term"><em class=
"parameter"><code>vstride
</code></em></span></dt><dd><p>
83 Specifies the number of floats or doubles between
84 the beginning of control point
85 <mml:math xmlns:
mml=
"http://www.w3.org/1998/Math/MathML" overflow=
"scroll">
87 <mml:msub><mml:mi mathvariant=
"italic">R
</mml:mi>
88 <mml:mi mathvariant=
"italic">ij
</mml:mi>
91 and the beginning of control point
92 <mml:math xmlns:
mml=
"http://www.w3.org/1998/Math/MathML" overflow=
"scroll">
94 <mml:msub><mml:mi mathvariant=
"italic">R
</mml:mi>
95 <mml:mfenced open=
"" close=
"">
97 <mml:mi mathvariant=
"italic">i
</mml:mi>
99 <mml:mfenced open=
"(" close=
")">
101 <mml:mi mathvariant=
"italic">j
</mml:mi>
111 <mml:math xmlns:
mml=
"http://www.w3.org/1998/Math/MathML" overflow=
"scroll"><mml:mi mathvariant=
"italic">i
</mml:mi></mml:math>
113 <mml:math xmlns:
mml=
"http://www.w3.org/1998/Math/MathML" overflow=
"scroll"><mml:mi mathvariant=
"italic">j
</mml:mi></mml:math>
115 <mml:math xmlns:
mml=
"http://www.w3.org/1998/Math/MathML" overflow=
"scroll"><mml:mi mathvariant=
"italic">u
</mml:mi></mml:math>
117 <mml:math xmlns:
mml=
"http://www.w3.org/1998/Math/MathML" overflow=
"scroll"><mml:mi mathvariant=
"italic">v
</mml:mi></mml:math>
118 control point indices, respectively.
119 This allows control points to be embedded in arbitrary data structures.
120 The only constraint is that the values for a particular control point
121 must occupy contiguous memory locations. The initial value of
<em class=
"parameter"><code>vstride
</code></em> is
0.
122 </p></dd><dt><span class=
"term"><em class=
"parameter"><code>vorder
</code></em></span></dt><dd><p>
123 Specifies the dimension of the control point array in the
124 <mml:math xmlns:
mml=
"http://www.w3.org/1998/Math/MathML" overflow=
"scroll"><mml:mi mathvariant=
"italic">v
</mml:mi></mml:math>
126 Must be positive. The initial value is
1.
127 </p></dd><dt><span class=
"term"><em class=
"parameter"><code>points
</code></em></span></dt><dd><p>
128 Specifies a pointer to the array of control points.
129 </p></dd></dl></div></div><div class=
"refsect1" lang=
"en" xml:
lang=
"en"><a id=
"description"></a><h2>Description
</h2><p>
130 Evaluators provide a way to use polynomial or rational polynomial mapping
135 The values produced by an evaluator are sent on to further stages
136 of GL processing just as if they had been presented using
137 <a class=
"citerefentry" href=
"glVertex.xml"><span class=
"citerefentry"><span class=
"refentrytitle">glVertex
</span></span></a>,
138 <a class=
"citerefentry" href=
"glNormal.xml"><span class=
"citerefentry"><span class=
"refentrytitle">glNormal
</span></span></a>,
139 <a class=
"citerefentry" href=
"glTexCoord.xml"><span class=
"citerefentry"><span class=
"refentrytitle">glTexCoord
</span></span></a>, and
140 <a class=
"citerefentry" href=
"glColor.xml"><span class=
"citerefentry"><span class=
"refentrytitle">glColor
</span></span></a> commands,
141 except that the generated values do not update the current normal,
145 All polynomial or rational polynomial splines of any degree
146 (up to the maximum degree supported by the GL implementation)
147 can be described using evaluators.
148 These include almost all surfaces used in computer graphics,
149 including B-spline surfaces,
151 Bezier surfaces, and so on.
153 Evaluators define surfaces based on bivariate Bernstein polynomials.
155 <mml:math xmlns:
mml=
"http://www.w3.org/1998/Math/MathML" overflow=
"scroll">
158 <mml:mi mathvariant=
"italic">p
</mml:mi>
160 <mml:mfenced open=
"(" close=
")">
161 <mml:mover><mml:mi mathvariant=
"italic">u
</mml:mi><mml:mo>̂
</mml:mo></mml:mover>
162 <mml:mover><mml:mi mathvariant=
"italic">v
</mml:mi><mml:mo>̂
</mml:mo></mml:mover>
168 </p><div class=
"informalequation"><mml:math xmlns:
mml=
"http://www.w3.org/1998/Math/MathML" overflow=
"scroll">
172 <mml:mi mathvariant=
"italic">p
</mml:mi>
174 <mml:mfenced open=
"(" close=
")">
175 <mml:mover><mml:mi mathvariant=
"italic">u
</mml:mi><mml:mo>̂
</mml:mo></mml:mover>
176 <mml:mover><mml:mi mathvariant=
"italic">v
</mml:mi><mml:mo>̂
</mml:mo></mml:mover>
184 <mml:mi mathvariant=
"italic">i
</mml:mi>
188 <mml:mi mathvariant=
"italic">n
</mml:mi>
194 <mml:mi mathvariant=
"italic">j
</mml:mi>
198 <mml:mi mathvariant=
"italic">m
</mml:mi>
202 <mml:msup><mml:mfenced open=
"" close=
"">
203 <mml:msub><mml:mi mathvariant=
"italic">B
</mml:mi>
204 <mml:mi mathvariant=
"italic">i
</mml:mi>
207 <mml:mi mathvariant=
"italic">n
</mml:mi>
210 <mml:mfenced open=
"(" close=
")">
211 <mml:mover><mml:mi mathvariant=
"italic">u
</mml:mi><mml:mo>̂
</mml:mo></mml:mover>
216 <mml:msup><mml:mfenced open=
"" close=
"">
217 <mml:msub><mml:mi mathvariant=
"italic">B
</mml:mi>
218 <mml:mi mathvariant=
"italic">j
</mml:mi>
221 <mml:mi mathvariant=
"italic">m
</mml:mi>
224 <mml:mfenced open=
"(" close=
")">
225 <mml:mover><mml:mi mathvariant=
"italic">v
</mml:mi><mml:mo>̂
</mml:mo></mml:mover>
229 <mml:msub><mml:mi mathvariant=
"italic">R
</mml:mi>
230 <mml:mi mathvariant=
"italic">ij
</mml:mi>
240 <mml:math xmlns:
mml=
"http://www.w3.org/1998/Math/MathML" overflow=
"scroll">
242 <mml:msub><mml:mi mathvariant=
"italic">R
</mml:mi>
243 <mml:mi mathvariant=
"italic">ij
</mml:mi>
247 <mml:math xmlns:
mml=
"http://www.w3.org/1998/Math/MathML" overflow=
"scroll">
250 <mml:msup><mml:mfenced open=
"" close=
"">
251 <mml:msub><mml:mi mathvariant=
"italic">B
</mml:mi>
252 <mml:mi mathvariant=
"italic">i
</mml:mi>
255 <mml:mi mathvariant=
"italic">n
</mml:mi>
258 <mml:mfenced open=
"(" close=
")">
259 <mml:mover><mml:mi mathvariant=
"italic">u
</mml:mi><mml:mo>̂
</mml:mo></mml:mover>
264 <mml:math xmlns:
mml=
"http://www.w3.org/1998/Math/MathML" overflow=
"scroll"><mml:mi mathvariant=
"italic">i
</mml:mi></mml:math>th
265 Bernstein polynomial of degree
266 <mml:math xmlns:
mml=
"http://www.w3.org/1998/Math/MathML" overflow=
"scroll"><mml:mi mathvariant=
"italic">n
</mml:mi></mml:math>
267 (
<em class=
"parameter"><code>uorder
</code></em> =
268 <mml:math xmlns:
mml=
"http://www.w3.org/1998/Math/MathML" overflow=
"scroll">
271 <mml:mi mathvariant=
"italic">n
</mml:mi>
277 </p><div class=
"informalequation"><mml:math xmlns:
mml=
"http://www.w3.org/1998/Math/MathML" overflow=
"scroll">
281 <mml:msup><mml:mfenced open=
"" close=
"">
282 <mml:msub><mml:mi mathvariant=
"italic">B
</mml:mi>
283 <mml:mi mathvariant=
"italic">i
</mml:mi>
286 <mml:mi mathvariant=
"italic">n
</mml:mi>
289 <mml:mfenced open=
"(" close=
")">
290 <mml:mover><mml:mi mathvariant=
"italic">u
</mml:mi><mml:mo>̂
</mml:mo></mml:mover>
295 <mml:mfenced open=
"(" close=
")">
296 <mml:mfenced open=
"" close=
"">
299 <mml:mi mathvariant=
"italic">n
</mml:mi>
302 <mml:mi mathvariant=
"italic">i
</mml:mi>
308 <mml:msup><mml:mfenced open=
"" close=
"">
309 <mml:mover><mml:mi mathvariant=
"italic">u
</mml:mi><mml:mo>̂
</mml:mo></mml:mover>
311 <mml:mi mathvariant=
"italic">i
</mml:mi>
314 <mml:mfenced open=
"" close=
"">
315 <mml:msup><mml:mfenced open=
"(" close=
")">
319 <mml:mover><mml:mi mathvariant=
"italic">u
</mml:mi><mml:mo>̂
</mml:mo></mml:mover>
322 <mml:mfenced open=
"" close=
"">
324 <mml:mi mathvariant=
"italic">n
</mml:mi>
326 <mml:mi mathvariant=
"italic">i
</mml:mi>
336 <mml:math xmlns:
mml=
"http://www.w3.org/1998/Math/MathML" overflow=
"scroll">
339 <mml:msup><mml:mfenced open=
"" close=
"">
340 <mml:msub><mml:mi mathvariant=
"italic">B
</mml:mi>
341 <mml:mi mathvariant=
"italic">j
</mml:mi>
344 <mml:mi mathvariant=
"italic">m
</mml:mi>
347 <mml:mfenced open=
"(" close=
")">
348 <mml:mover><mml:mi mathvariant=
"italic">v
</mml:mi><mml:mo>̂
</mml:mo></mml:mover>
353 <mml:math xmlns:
mml=
"http://www.w3.org/1998/Math/MathML" overflow=
"scroll"><mml:mi mathvariant=
"italic">j
</mml:mi></mml:math>th
354 Bernstein polynomial of degree
355 <mml:math xmlns:
mml=
"http://www.w3.org/1998/Math/MathML" overflow=
"scroll"><mml:mi mathvariant=
"italic">m
</mml:mi></mml:math>
356 (
<em class=
"parameter"><code>vorder
</code></em> =
357 <mml:math xmlns:
mml=
"http://www.w3.org/1998/Math/MathML" overflow=
"scroll">
360 <mml:mi mathvariant=
"italic">m
</mml:mi>
366 </p><div class=
"informalequation"><mml:math xmlns:
mml=
"http://www.w3.org/1998/Math/MathML" overflow=
"scroll">
370 <mml:msup><mml:mfenced open=
"" close=
"">
371 <mml:msub><mml:mi mathvariant=
"italic">B
</mml:mi>
372 <mml:mi mathvariant=
"italic">j
</mml:mi>
375 <mml:mi mathvariant=
"italic">m
</mml:mi>
378 <mml:mfenced open=
"(" close=
")">
379 <mml:mover><mml:mi mathvariant=
"italic">v
</mml:mi><mml:mo>̂
</mml:mo></mml:mover>
384 <mml:mfenced open=
"(" close=
")">
385 <mml:mfenced open=
"" close=
"">
388 <mml:mi mathvariant=
"italic">m
</mml:mi>
391 <mml:mi mathvariant=
"italic">j
</mml:mi>
397 <mml:msup><mml:mfenced open=
"" close=
"">
398 <mml:mover><mml:mi mathvariant=
"italic">v
</mml:mi><mml:mo>̂
</mml:mo></mml:mover>
400 <mml:mi mathvariant=
"italic">j
</mml:mi>
403 <mml:mfenced open=
"" close=
"">
404 <mml:msup><mml:mfenced open=
"(" close=
")">
408 <mml:mover><mml:mi mathvariant=
"italic">v
</mml:mi><mml:mo>̂
</mml:mo></mml:mover>
411 <mml:mfenced open=
"" close=
"">
413 <mml:mi mathvariant=
"italic">m
</mml:mi>
415 <mml:mi mathvariant=
"italic">j
</mml:mi>
425 <mml:math xmlns:
mml=
"http://www.w3.org/1998/Math/MathML" overflow=
"scroll">
428 <mml:msup><mml:mn>0</mml:mn>
436 <mml:math xmlns:
mml=
"http://www.w3.org/1998/Math/MathML" overflow=
"scroll">
439 <mml:mfenced open=
"(" close=
")">
440 <mml:mfenced open=
"" close=
"">
443 <mml:mi mathvariant=
"italic">n
</mml:mi>
456 <code class=
"function">glMap2
</code> is used to define the basis and to specify what kind of values
459 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>
460 with the map name, one of the nine predefined values for
<em class=
"parameter"><code>target
</code></em>,
462 When
<a class=
"citerefentry" href=
"glEvalCoord2.xml"><span class=
"citerefentry"><span class=
"refentrytitle">glEvalCoord2
</span></span></a> presents values
463 <mml:math xmlns:
mml=
"http://www.w3.org/1998/Math/MathML" overflow=
"scroll"><mml:mi mathvariant=
"italic">u
</mml:mi></mml:math>
465 <mml:math xmlns:
mml=
"http://www.w3.org/1998/Math/MathML" overflow=
"scroll"><mml:mi mathvariant=
"italic">v
</mml:mi></mml:math>,
466 the bivariate Bernstein polynomials are evaluated using
467 <mml:math xmlns:
mml=
"http://www.w3.org/1998/Math/MathML" overflow=
"scroll">
469 <mml:mover><mml:mi mathvariant=
"italic">u
</mml:mi><mml:mo>̂
</mml:mo></mml:mover>
472 <mml:math xmlns:
mml=
"http://www.w3.org/1998/Math/MathML" overflow=
"scroll">
474 <mml:mover><mml:mi mathvariant=
"italic">v
</mml:mi><mml:mo>̂
</mml:mo></mml:mover>
478 <mml:math xmlns:
mml=
"http://www.w3.org/1998/Math/MathML" overflow=
"scroll">
481 <mml:mover><mml:mi mathvariant=
"italic">u
</mml:mi><mml:mo>̂
</mml:mo></mml:mover>
484 <mml:mfenced open=
"" close=
"">
486 <mml:mi mathvariant=
"italic">u
</mml:mi>
488 <mml:mi mathvariant=
"italic">u1
</mml:mi>
491 <mml:mfenced open=
"" close=
"">
493 <mml:mi mathvariant=
"italic">u2
</mml:mi>
495 <mml:mi mathvariant=
"italic">u1
</mml:mi>
502 <mml:math xmlns:
mml=
"http://www.w3.org/1998/Math/MathML" overflow=
"scroll">
505 <mml:mover><mml:mi mathvariant=
"italic">v
</mml:mi><mml:mo>̂
</mml:mo></mml:mover>
508 <mml:mfenced open=
"" close=
"">
510 <mml:mi mathvariant=
"italic">v
</mml:mi>
512 <mml:mi mathvariant=
"italic">v1
</mml:mi>
515 <mml:mfenced open=
"" close=
"">
517 <mml:mi mathvariant=
"italic">v2
</mml:mi>
519 <mml:mi mathvariant=
"italic">v1
</mml:mi>
526 <em class=
"parameter"><code>target
</code></em> is a symbolic constant that indicates what kind of control points
527 are provided in
<em class=
"parameter"><code>points
</code></em>,
528 and what output is generated when the map is evaluated.
529 It can assume one of nine predefined values:
530 </p><div class=
"variablelist"><dl><dt><span class=
"term"><code class=
"constant">GL_MAP2_VERTEX_3
</code></span></dt><dd><p>
531 Each control point is three floating-point values representing
532 <mml:math xmlns:
mml=
"http://www.w3.org/1998/Math/MathML" overflow=
"scroll"><mml:mi mathvariant=
"italic">x
</mml:mi></mml:math>,
533 <mml:math xmlns:
mml=
"http://www.w3.org/1998/Math/MathML" overflow=
"scroll"><mml:mi mathvariant=
"italic">y
</mml:mi></mml:math>,
535 <mml:math xmlns:
mml=
"http://www.w3.org/1998/Math/MathML" overflow=
"scroll"><mml:mi mathvariant=
"italic">z
</mml:mi></mml:math>.
536 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.
537 </p></dd><dt><span class=
"term"><code class=
"constant">GL_MAP2_VERTEX_4
</code></span></dt><dd><p>
538 Each control point is four floating-point values representing
539 <mml:math xmlns:
mml=
"http://www.w3.org/1998/Math/MathML" overflow=
"scroll"><mml:mi mathvariant=
"italic">x
</mml:mi></mml:math>,
540 <mml:math xmlns:
mml=
"http://www.w3.org/1998/Math/MathML" overflow=
"scroll"><mml:mi mathvariant=
"italic">y
</mml:mi></mml:math>,
541 <mml:math xmlns:
mml=
"http://www.w3.org/1998/Math/MathML" overflow=
"scroll"><mml:mi mathvariant=
"italic">z
</mml:mi></mml:math>,
543 <mml:math xmlns:
mml=
"http://www.w3.org/1998/Math/MathML" overflow=
"scroll"><mml:mi mathvariant=
"italic">w
</mml:mi></mml:math>.
544 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.
545 </p></dd><dt><span class=
"term"><code class=
"constant">GL_MAP2_INDEX
</code></span></dt><dd><p>
546 Each control point is a single floating-point value representing a color index.
547 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
548 but the current index is not updated with the value of these
549 <a class=
"citerefentry" href=
"glIndex.xml"><span class=
"citerefentry"><span class=
"refentrytitle">glIndex
</span></span></a> commands.
550 </p></dd><dt><span class=
"term"><code class=
"constant">GL_MAP2_COLOR_4
</code></span></dt><dd><p>
551 Each control point is four floating-point values representing
552 red, green, blue, and alpha.
553 Internal
<a class=
"citerefentry" href=
"glColor4.xml"><span class=
"citerefentry"><span class=
"refentrytitle">glColor4
</span></span></a> commands are generated when the map is
554 evaluated but the current color is not updated with the value of
555 these
<a class=
"citerefentry" href=
"glColor4.xml"><span class=
"citerefentry"><span class=
"refentrytitle">glColor4
</span></span></a> commands.
556 </p></dd><dt><span class=
"term"><code class=
"constant">GL_MAP2_NORMAL
</code></span></dt><dd><p>
557 Each control point is three floating-point values representing
559 <mml:math xmlns:
mml=
"http://www.w3.org/1998/Math/MathML" overflow=
"scroll"><mml:mi mathvariant=
"italic">x
</mml:mi></mml:math>,
560 <mml:math xmlns:
mml=
"http://www.w3.org/1998/Math/MathML" overflow=
"scroll"><mml:mi mathvariant=
"italic">y
</mml:mi></mml:math>,
562 <mml:math xmlns:
mml=
"http://www.w3.org/1998/Math/MathML" overflow=
"scroll"><mml:mi mathvariant=
"italic">z
</mml:mi></mml:math>
563 components of a normal vector.
564 Internal
<a class=
"citerefentry" href=
"glNormal.xml"><span class=
"citerefentry"><span class=
"refentrytitle">glNormal
</span></span></a> commands are generated when the map is
565 evaluated but the current normal is not updated with the value of
566 these
<a class=
"citerefentry" href=
"glNormal.xml"><span class=
"citerefentry"><span class=
"refentrytitle">glNormal
</span></span></a> commands.
567 </p></dd><dt><span class=
"term"><code class=
"constant">GL_MAP2_TEXTURE_COORD_1
</code></span></dt><dd><p>
568 Each control point is a single floating-point value representing
570 <mml:math xmlns:
mml=
"http://www.w3.org/1998/Math/MathML" overflow=
"scroll"><mml:mi mathvariant=
"italic">s
</mml:mi></mml:math>
573 <a class=
"citerefentry" href=
"glTexCoord1.xml"><span class=
"citerefentry"><span class=
"refentrytitle">glTexCoord1
</span></span></a> commands are generated when the map is evaluated but
574 the current texture coordinates are not updated with the value
575 of these
<a class=
"citerefentry" href=
"glTexCoord.xml"><span class=
"citerefentry"><span class=
"refentrytitle">glTexCoord
</span></span></a> commands.
576 </p></dd><dt><span class=
"term"><code class=
"constant">GL_MAP2_TEXTURE_COORD_2
</code></span></dt><dd><p>
577 Each control point is two floating-point values representing
579 <mml:math xmlns:
mml=
"http://www.w3.org/1998/Math/MathML" overflow=
"scroll"><mml:mi mathvariant=
"italic">s
</mml:mi></mml:math>
581 <mml:math xmlns:
mml=
"http://www.w3.org/1998/Math/MathML" overflow=
"scroll"><mml:mi mathvariant=
"italic">t
</mml:mi></mml:math>
584 <a class=
"citerefentry" href=
"glTexCoord2.xml"><span class=
"citerefentry"><span class=
"refentrytitle">glTexCoord2
</span></span></a> commands are generated when the map is evaluated but
585 the current texture coordinates are not updated with the value
586 of these
<a class=
"citerefentry" href=
"glTexCoord.xml"><span class=
"citerefentry"><span class=
"refentrytitle">glTexCoord
</span></span></a> commands.
587 </p></dd><dt><span class=
"term"><code class=
"constant">GL_MAP2_TEXTURE_COORD_3
</code></span></dt><dd><p>
588 Each control point is three floating-point values representing
590 <mml:math xmlns:
mml=
"http://www.w3.org/1998/Math/MathML" overflow=
"scroll"><mml:mi mathvariant=
"italic">s
</mml:mi></mml:math>,
591 <mml:math xmlns:
mml=
"http://www.w3.org/1998/Math/MathML" overflow=
"scroll"><mml:mi mathvariant=
"italic">t
</mml:mi></mml:math>,
593 <mml:math xmlns:
mml=
"http://www.w3.org/1998/Math/MathML" overflow=
"scroll"><mml:mi mathvariant=
"italic">r
</mml:mi></mml:math>
595 Internal
<a class=
"citerefentry" href=
"glTexCoord3.xml"><span class=
"citerefentry"><span class=
"refentrytitle">glTexCoord3
</span></span></a> commands are generated when the map is
596 evaluated but the current texture coordinates are not updated with the value
597 of these
<a class=
"citerefentry" href=
"glTexCoord.xml"><span class=
"citerefentry"><span class=
"refentrytitle">glTexCoord
</span></span></a> commands.
598 </p></dd><dt><span class=
"term"><code class=
"constant">GL_MAP2_TEXTURE_COORD_4
</code></span></dt><dd><p>
599 Each control point is four floating-point values representing
601 <mml:math xmlns:
mml=
"http://www.w3.org/1998/Math/MathML" overflow=
"scroll"><mml:mi mathvariant=
"italic">s
</mml:mi></mml:math>,
602 <mml:math xmlns:
mml=
"http://www.w3.org/1998/Math/MathML" overflow=
"scroll"><mml:mi mathvariant=
"italic">t
</mml:mi></mml:math>,
603 <mml:math xmlns:
mml=
"http://www.w3.org/1998/Math/MathML" overflow=
"scroll"><mml:mi mathvariant=
"italic">r
</mml:mi></mml:math>,
605 <mml:math xmlns:
mml=
"http://www.w3.org/1998/Math/MathML" overflow=
"scroll"><mml:mi mathvariant=
"italic">q
</mml:mi></mml:math>
608 <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 the current texture coordinates are not updated with the value
609 of these
<a class=
"citerefentry" href=
"glTexCoord.xml"><span class=
"citerefentry"><span class=
"refentrytitle">glTexCoord
</span></span></a> commands.
610 </p></dd></dl></div><p>
611 <em class=
"parameter"><code>ustride
</code></em>,
612 <em class=
"parameter"><code>uorder
</code></em>,
613 <em class=
"parameter"><code>vstride
</code></em>,
614 <em class=
"parameter"><code>vorder
</code></em>, and
615 <em class=
"parameter"><code>points
</code></em> define the array addressing for accessing the control points.
616 <em class=
"parameter"><code>points
</code></em> is the location of the first control point,
617 which occupies one, two, three, or four contiguous memory locations,
618 depending on which map is being defined.
620 <mml:math xmlns:
mml=
"http://www.w3.org/1998/Math/MathML" overflow=
"scroll">
623 <mml:mi mathvariant=
"italic">uorder
</mml:mi>
625 <mml:mi mathvariant=
"italic">vorder
</mml:mi>
628 control points in the array.
629 <em class=
"parameter"><code>ustride
</code></em> specifies how many float or double locations are skipped to advance
630 the internal memory pointer from control point
631 <mml:math xmlns:
mml=
"http://www.w3.org/1998/Math/MathML" overflow=
"scroll">
633 <mml:msub><mml:mi mathvariant=
"italic">R
</mml:mi>
634 <mml:mfenced open=
"" close=
"">
636 <mml:mi mathvariant=
"italic">i
</mml:mi>
638 <mml:mi mathvariant=
"italic">j
</mml:mi>
644 <mml:math xmlns:
mml=
"http://www.w3.org/1998/Math/MathML" overflow=
"scroll">
646 <mml:msub><mml:mi mathvariant=
"italic">R
</mml:mi>
647 <mml:mfenced open=
"" close=
"">
649 <mml:mfenced open=
"(" close=
")">
651 <mml:mi mathvariant=
"italic">i
</mml:mi>
657 <mml:mi mathvariant=
"italic">j
</mml:mi>
662 <em class=
"parameter"><code>vstride
</code></em> specifies how many float or double locations are skipped to advance
663 the internal memory pointer from control point
664 <mml:math xmlns:
mml=
"http://www.w3.org/1998/Math/MathML" overflow=
"scroll">
666 <mml:msub><mml:mi mathvariant=
"italic">R
</mml:mi>
667 <mml:mfenced open=
"" close=
"">
669 <mml:mi mathvariant=
"italic">i
</mml:mi>
671 <mml:mi mathvariant=
"italic">j
</mml:mi>
677 <mml:math xmlns:
mml=
"http://www.w3.org/1998/Math/MathML" overflow=
"scroll">
679 <mml:msub><mml:mi mathvariant=
"italic">R
</mml:mi>
680 <mml:mfenced open=
"" close=
"">
682 <mml:mi mathvariant=
"italic">i
</mml:mi>
684 <mml:mfenced open=
"(" close=
")">
686 <mml:mi mathvariant=
"italic">j
</mml:mi>
695 </p></div><div class=
"refsect1" lang=
"en" xml:
lang=
"en"><a id=
"notes"></a><h2>Notes
</h2><p>
696 As is the case with all GL commands that accept pointers to data,
697 it is as if the contents of
<em class=
"parameter"><code>points
</code></em> were copied by
<code class=
"function">glMap2
</code> before
<code class=
"function">glMap2
</code>
699 Changes to the contents of
<em class=
"parameter"><code>points
</code></em> have no effect after
<code class=
"function">glMap2
</code> is called.
701 Initially,
<code class=
"constant">GL_AUTO_NORMAL
</code> is enabled. If
<code class=
"constant">GL_AUTO_NORMAL
</code> is enabled,
702 normal vectors are generated when either
703 <code class=
"constant">GL_MAP2_VERTEX_3
</code> or
<code class=
"constant">GL_MAP2_VERTEX_4
</code> is used to generate
705 </p></div><div class=
"refsect1" lang=
"en" xml:
lang=
"en"><a id=
"errors"></a><h2>Errors
</h2><p>
706 <code class=
"constant">GL_INVALID_ENUM
</code> is generated if
<em class=
"parameter"><code>target
</code></em> is not an accepted value.
708 <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>,
709 or if
<em class=
"parameter"><code>v1
</code></em> is equal to
<em class=
"parameter"><code>v2
</code></em>.
711 <code class=
"constant">GL_INVALID_VALUE
</code> is generated if either
<em class=
"parameter"><code>ustride
</code></em> or
<em class=
"parameter"><code>vstride
</code></em>
712 is less than the number of values in a control point.
714 <code class=
"constant">GL_INVALID_VALUE
</code> is generated if either
<em class=
"parameter"><code>uorder
</code></em> or
<em class=
"parameter"><code>vorder
</code></em>
715 is less than
1 or greater than the return value of
<code class=
"constant">GL_MAX_EVAL_ORDER
</code>.
717 <code class=
"constant">GL_INVALID_OPERATION
</code> is generated if
<code class=
"function">glMap2
</code>
718 is executed between the execution of
719 <a class=
"citerefentry" href=
"glBegin.xml"><span class=
"citerefentry"><span class=
"refentrytitle">glBegin
</span></span></a>
720 and the corresponding execution of
<a class=
"citerefentry" href=
"glEnd.xml"><span class=
"citerefentry"><span class=
"refentrytitle">glEnd
</span></span></a>.
722 <code class=
"constant">GL_INVALID_OPERATION
</code> is generated if
<code class=
"function">glMap2
</code> is called and the value
723 of
<code class=
"constant">GL_ACTIVE_TEXTURE
</code> is not
<code class=
"constant">GL_TEXTURE0
</code>.
724 </p></div><div class=
"refsect1" lang=
"en" xml:
lang=
"en"><a id=
"associatedgets"></a><h2>Associated Gets
</h2><p>
725 <a class=
"citerefentry" href=
"glGetMap.xml"><span class=
"citerefentry"><span class=
"refentrytitle">glGetMap
</span></span></a>
727 <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>
729 <a class=
"citerefentry" href=
"glIsEnabled.xml"><span class=
"citerefentry"><span class=
"refentrytitle">glIsEnabled
</span></span></a> with argument
<code class=
"constant">GL_MAP2_VERTEX_3
</code>
731 <a class=
"citerefentry" href=
"glIsEnabled.xml"><span class=
"citerefentry"><span class=
"refentrytitle">glIsEnabled
</span></span></a> with argument
<code class=
"constant">GL_MAP2_VERTEX_4
</code>
733 <a class=
"citerefentry" href=
"glIsEnabled.xml"><span class=
"citerefentry"><span class=
"refentrytitle">glIsEnabled
</span></span></a> with argument
<code class=
"constant">GL_MAP2_INDEX
</code>
735 <a class=
"citerefentry" href=
"glIsEnabled.xml"><span class=
"citerefentry"><span class=
"refentrytitle">glIsEnabled
</span></span></a> with argument
<code class=
"constant">GL_MAP2_COLOR_4
</code>
737 <a class=
"citerefentry" href=
"glIsEnabled.xml"><span class=
"citerefentry"><span class=
"refentrytitle">glIsEnabled
</span></span></a> with argument
<code class=
"constant">GL_MAP2_NORMAL
</code>
739 <a class=
"citerefentry" href=
"glIsEnabled.xml"><span class=
"citerefentry"><span class=
"refentrytitle">glIsEnabled
</span></span></a> with argument
<code class=
"constant">GL_MAP2_TEXTURE_COORD_1
</code>
741 <a class=
"citerefentry" href=
"glIsEnabled.xml"><span class=
"citerefentry"><span class=
"refentrytitle">glIsEnabled
</span></span></a> with argument
<code class=
"constant">GL_MAP2_TEXTURE_COORD_2
</code>
743 <a class=
"citerefentry" href=
"glIsEnabled.xml"><span class=
"citerefentry"><span class=
"refentrytitle">glIsEnabled
</span></span></a> with argument
<code class=
"constant">GL_MAP2_TEXTURE_COORD_3
</code>
745 <a class=
"citerefentry" href=
"glIsEnabled.xml"><span class=
"citerefentry"><span class=
"refentrytitle">glIsEnabled
</span></span></a> with argument
<code class=
"constant">GL_MAP2_TEXTURE_COORD_4
</code>
746 </p></div><div class=
"refsect1" lang=
"en" xml:
lang=
"en"><a id=
"seealso"></a><h2>See Also
</h2><p>
747 <a class=
"citerefentry" href=
"glBegin.xml"><span class=
"citerefentry"><span class=
"refentrytitle">glBegin
</span></span></a>,
748 <a class=
"citerefentry" href=
"glColor.xml"><span class=
"citerefentry"><span class=
"refentrytitle">glColor
</span></span></a>,
749 <a class=
"citerefentry" href=
"glEnable.xml"><span class=
"citerefentry"><span class=
"refentrytitle">glEnable
</span></span></a>,
750 <a class=
"citerefentry" href=
"glEvalCoord.xml"><span class=
"citerefentry"><span class=
"refentrytitle">glEvalCoord
</span></span></a>,
751 <a class=
"citerefentry" href=
"glEvalMesh.xml"><span class=
"citerefentry"><span class=
"refentrytitle">glEvalMesh
</span></span></a>,
752 <a class=
"citerefentry" href=
"glEvalPoint.xml"><span class=
"citerefentry"><span class=
"refentrytitle">glEvalPoint
</span></span></a>,
753 <a class=
"citerefentry" href=
"glMap1.xml"><span class=
"citerefentry"><span class=
"refentrytitle">glMap1
</span></span></a>,
754 <a class=
"citerefentry" href=
"glMapGrid.xml"><span class=
"citerefentry"><span class=
"refentrytitle">glMapGrid
</span></span></a>,
755 <a class=
"citerefentry" href=
"glNormal.xml"><span class=
"citerefentry"><span class=
"refentrytitle">glNormal
</span></span></a>,
756 <a class=
"citerefentry" href=
"glTexCoord.xml"><span class=
"citerefentry"><span class=
"refentrytitle">glTexCoord
</span></span></a>,
757 <a class=
"citerefentry" href=
"glVertex.xml"><span class=
"citerefentry"><span class=
"refentrytitle">glVertex
</span></span></a>
758 </p></div><div class=
"refsect1" lang=
"en" xml:
lang=
"en"><a id=
"Copyright"></a><h2>Copyright
</h2><p>
759 Copyright
<span class=
"trademark"></span>©
1991-
2006
760 Silicon Graphics, Inc. This document is licensed under the SGI
761 Free Software B License. For details, see
762 <a class=
"ulink" href=
"http://oss.sgi.com/projects/FreeB/" target=
"_top">http://oss.sgi.com/projects/FreeB/
</a>.
763 </p></div></div></body></html>