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">
9 <holder>Silicon Graphics, Inc.
</holder>
12 <refentrytitle>glMap2
</refentrytitle>
13 <manvolnum>3G
</manvolnum>
16 <refname>glMap2
</refname>
17 <refpurpose>define a two-dimensional evaluator
</refpurpose>
19 <refsynopsisdiv><title>C Specification
</title>
22 <funcdef>void
<function>glMap2f
</function></funcdef>
23 <paramdef>GLenum
<parameter>target
</parameter></paramdef>
24 <paramdef>GLfloat
<parameter>u1
</parameter></paramdef>
25 <paramdef>GLfloat
<parameter>u2
</parameter></paramdef>
26 <paramdef>GLint
<parameter>ustride
</parameter></paramdef>
27 <paramdef>GLint
<parameter>uorder
</parameter></paramdef>
28 <paramdef>GLfloat
<parameter>v1
</parameter></paramdef>
29 <paramdef>GLfloat
<parameter>v2
</parameter></paramdef>
30 <paramdef>GLint
<parameter>vstride
</parameter></paramdef>
31 <paramdef>GLint
<parameter>vorder
</parameter></paramdef>
32 <paramdef>const GLfloat *
<parameter>points
</parameter></paramdef>
37 <funcdef>void
<function>glMap2d
</function></funcdef>
38 <paramdef>GLenum
<parameter>target
</parameter></paramdef>
39 <paramdef>GLdouble
<parameter>u1
</parameter></paramdef>
40 <paramdef>GLdouble
<parameter>u2
</parameter></paramdef>
41 <paramdef>GLint
<parameter>ustride
</parameter></paramdef>
42 <paramdef>GLint
<parameter>uorder
</parameter></paramdef>
43 <paramdef>GLdouble
<parameter>v1
</parameter></paramdef>
44 <paramdef>GLdouble
<parameter>v2
</parameter></paramdef>
45 <paramdef>GLint
<parameter>vstride
</parameter></paramdef>
46 <paramdef>GLint
<parameter>vorder
</parameter></paramdef>
47 <paramdef>const GLdouble *
<parameter>points
</parameter></paramdef>
51 <!-- eqn: ignoring delim $$ -->
52 <refsect1 id=
"parameters"><title>Parameters
</title>
55 <term><parameter>target
</parameter></term>
58 Specifies the kind of values that are generated by the evaluator.
60 <constant>GL_MAP2_VERTEX_3
</constant>,
61 <constant>GL_MAP2_VERTEX_4
</constant>,
62 <constant>GL_MAP2_INDEX
</constant>,
63 <constant>GL_MAP2_COLOR_4
</constant>,
64 <constant>GL_MAP2_NORMAL
</constant>,
65 <constant>GL_MAP2_TEXTURE_COORD_1
</constant>,
66 <constant>GL_MAP2_TEXTURE_COORD_2
</constant>,
67 <constant>GL_MAP2_TEXTURE_COORD_3
</constant>, and
68 <constant>GL_MAP2_TEXTURE_COORD_4
</constant> are accepted.
73 <term><parameter>u1
</parameter></term>
74 <term><parameter>u2
</parameter></term>
77 Specify a linear mapping of
78 <inlineequation><mml:math><mml:mi mathvariant=
"italic">u
</mml:mi></mml:math></inlineequation>,
79 as presented to
<citerefentry><refentrytitle>glEvalCoord2
</refentrytitle></citerefentry>,
81 <inlineequation><mml:math>
83 <mml:mover><mml:mi mathvariant=
"italic">u
</mml:mi><mml:mo>^</mml:mo></mml:mover>
84 </mml:math></inlineequation>,
85 one of the two variables that are evaluated by the equations specified
86 by this command. Initially,
<parameter>u1
</parameter> is
0 and
<parameter>u2
</parameter> is
1.
91 <term><parameter>ustride
</parameter></term>
94 Specifies the number of floats or doubles between
95 the beginning of control point
96 <inlineequation><mml:math>
97 <!-- eqn: R sub ij:-->
98 <mml:msub><mml:mi mathvariant=
"italic">R
</mml:mi>
99 <mml:mi mathvariant=
"italic">ij
</mml:mi>
101 </mml:math></inlineequation>
102 and the beginning of control point
103 <inlineequation><mml:math>
104 <!-- eqn: R sub { (i+1) j }:-->
105 <mml:msub><mml:mi mathvariant=
"italic">R
</mml:mi>
106 <mml:mfenced open=
"" close=
"">
108 <mml:mfenced open=
"(" close=
")">
110 <mml:mi mathvariant=
"italic">i
</mml:mi>
115 <mml:mo>⁢</mml:mo>
116 <mml:mi mathvariant=
"italic">j
</mml:mi>
120 </mml:math></inlineequation>,
122 <inlineequation><mml:math><mml:mi mathvariant=
"italic">i
</mml:mi></mml:math></inlineequation>
124 <inlineequation><mml:math><mml:mi mathvariant=
"italic">j
</mml:mi></mml:math></inlineequation>
126 <inlineequation><mml:math><mml:mi mathvariant=
"italic">u
</mml:mi></mml:math></inlineequation>
128 <inlineequation><mml:math><mml:mi mathvariant=
"italic">v
</mml:mi></mml:math></inlineequation>
129 control point indices, respectively.
130 This allows control points to be embedded in arbitrary data structures.
131 The only constraint is that the values for a particular control point
132 must occupy contiguous memory locations. The initial value of
<parameter>ustride
</parameter> is
0.
137 <term><parameter>uorder
</parameter></term>
140 Specifies the dimension of the control point array in the
141 <inlineequation><mml:math><mml:mi mathvariant=
"italic">u
</mml:mi></mml:math></inlineequation>
143 Must be positive. The initial value is
1.
148 <term><parameter>v1
</parameter></term>
149 <term><parameter>v2
</parameter></term>
152 Specify a linear mapping of
153 <inlineequation><mml:math><mml:mi mathvariant=
"italic">v
</mml:mi></mml:math></inlineequation>,
154 as presented to
<citerefentry><refentrytitle>glEvalCoord2
</refentrytitle></citerefentry>,
156 <inlineequation><mml:math>
158 <mml:mover><mml:mi mathvariant=
"italic">v
</mml:mi><mml:mo>^</mml:mo></mml:mover>
159 </mml:math></inlineequation>,
160 one of the two variables that are evaluated by the equations specified
161 by this command. Initially,
<parameter>v1
</parameter> is
0 and
<parameter>v2
</parameter> is
1.
166 <term><parameter>vstride
</parameter></term>
169 Specifies the number of floats or doubles between
170 the beginning of control point
171 <inlineequation><mml:math>
172 <!-- eqn: R sub ij:-->
173 <mml:msub><mml:mi mathvariant=
"italic">R
</mml:mi>
174 <mml:mi mathvariant=
"italic">ij
</mml:mi>
176 </mml:math></inlineequation>
177 and the beginning of control point
178 <inlineequation><mml:math>
179 <!-- eqn: R sub { i (j+1) }:-->
180 <mml:msub><mml:mi mathvariant=
"italic">R
</mml:mi>
181 <mml:mfenced open=
"" close=
"">
183 <mml:mi mathvariant=
"italic">i
</mml:mi>
184 <mml:mo>⁡</mml:mo>
185 <mml:mfenced open=
"(" close=
")">
187 <mml:mi mathvariant=
"italic">j
</mml:mi>
195 </mml:math></inlineequation>,
197 <inlineequation><mml:math><mml:mi mathvariant=
"italic">i
</mml:mi></mml:math></inlineequation>
199 <inlineequation><mml:math><mml:mi mathvariant=
"italic">j
</mml:mi></mml:math></inlineequation>
201 <inlineequation><mml:math><mml:mi mathvariant=
"italic">u
</mml:mi></mml:math></inlineequation>
203 <inlineequation><mml:math><mml:mi mathvariant=
"italic">v
</mml:mi></mml:math></inlineequation>
204 control point indices, respectively.
205 This allows control points to be embedded in arbitrary data structures.
206 The only constraint is that the values for a particular control point
207 must occupy contiguous memory locations. The initial value of
<parameter>vstride
</parameter> is
0.
212 <term><parameter>vorder
</parameter></term>
215 Specifies the dimension of the control point array in the
216 <inlineequation><mml:math><mml:mi mathvariant=
"italic">v
</mml:mi></mml:math></inlineequation>
218 Must be positive. The initial value is
1.
223 <term><parameter>points
</parameter></term>
226 Specifies a pointer to the array of control points.
232 <refsect1 id=
"description"><title>Description
</title>
234 Evaluators provide a way to use polynomial or rational polynomial mapping
239 The values produced by an evaluator are sent on to further stages
240 of GL processing just as if they had been presented using
241 <citerefentry><refentrytitle>glVertex
</refentrytitle></citerefentry>,
242 <citerefentry><refentrytitle>glNormal
</refentrytitle></citerefentry>,
243 <citerefentry><refentrytitle>glTexCoord
</refentrytitle></citerefentry>, and
244 <citerefentry><refentrytitle>glColor
</refentrytitle></citerefentry> commands,
245 except that the generated values do not update the current normal,
250 All polynomial or rational polynomial splines of any degree
251 (up to the maximum degree supported by the GL implementation)
252 can be described using evaluators.
253 These include almost all surfaces used in computer graphics,
254 including B-spline surfaces,
256 Bezier surfaces, and so on.
259 Evaluators define surfaces based on bivariate Bernstein polynomials.
261 <inlineequation><mml:math>
262 <!-- eqn: p(u hat, v hat):-->
264 <mml:mi mathvariant=
"italic">p
</mml:mi>
265 <mml:mo>⁡</mml:mo>
266 <mml:mfenced open=
"(" close=
")">
267 <mml:mover><mml:mi mathvariant=
"italic">u
</mml:mi><mml:mo>^</mml:mo></mml:mover>
268 <mml:mover><mml:mi mathvariant=
"italic">v
</mml:mi><mml:mo>^</mml:mo></mml:mover>
271 </mml:math></inlineequation>
275 <informalequation><mml:math>
276 <!-- eqn: p(u hat, v hat) = sum from {i = 0} to {n} { sum from {j = 0} to {m} { {B sub i} sup n ( u hat ) {B sub j} sup m ( v hat ) R sub ij } }:-->
279 <mml:mi mathvariant=
"italic">p
</mml:mi>
280 <mml:mo>⁡</mml:mo>
281 <mml:mfenced open=
"(" close=
")">
282 <mml:mover><mml:mi mathvariant=
"italic">u
</mml:mi><mml:mo>^</mml:mo></mml:mover>
283 <mml:mover><mml:mi mathvariant=
"italic">v
</mml:mi><mml:mo>^</mml:mo></mml:mover>
289 <mml:mo>Σ</mml:mo>
291 <mml:mi mathvariant=
"italic">i
</mml:mi>
295 <mml:mi mathvariant=
"italic">n
</mml:mi>
299 <mml:mo>Σ</mml:mo>
301 <mml:mi mathvariant=
"italic">j
</mml:mi>
305 <mml:mi mathvariant=
"italic">m
</mml:mi>
309 <mml:msup><mml:mfenced open=
"" close=
"">
310 <mml:msub><mml:mi mathvariant=
"italic">B
</mml:mi>
311 <mml:mi mathvariant=
"italic">i
</mml:mi>
314 <mml:mi mathvariant=
"italic">n
</mml:mi>
316 <mml:mo>⁡</mml:mo>
317 <mml:mfenced open=
"(" close=
")">
318 <mml:mover><mml:mi mathvariant=
"italic">u
</mml:mi><mml:mo>^</mml:mo></mml:mover>
321 <mml:mo>⁢</mml:mo>
323 <mml:msup><mml:mfenced open=
"" close=
"">
324 <mml:msub><mml:mi mathvariant=
"italic">B
</mml:mi>
325 <mml:mi mathvariant=
"italic">j
</mml:mi>
328 <mml:mi mathvariant=
"italic">m
</mml:mi>
330 <mml:mo>⁡</mml:mo>
331 <mml:mfenced open=
"(" close=
")">
332 <mml:mover><mml:mi mathvariant=
"italic">v
</mml:mi><mml:mo>^</mml:mo></mml:mover>
335 <mml:mo>⁢</mml:mo>
336 <mml:msub><mml:mi mathvariant=
"italic">R
</mml:mi>
337 <mml:mi mathvariant=
"italic">ij
</mml:mi>
343 </mml:math></informalequation>
349 <inlineequation><mml:math>
350 <!-- eqn: R sub ij:-->
351 <mml:msub><mml:mi mathvariant=
"italic">R
</mml:mi>
352 <mml:mi mathvariant=
"italic">ij
</mml:mi>
354 </mml:math></inlineequation>
356 <inlineequation><mml:math>
357 <!-- eqn: {B sub i} sup n ( u hat ):-->
359 <mml:msup><mml:mfenced open=
"" close=
"">
360 <mml:msub><mml:mi mathvariant=
"italic">B
</mml:mi>
361 <mml:mi mathvariant=
"italic">i
</mml:mi>
364 <mml:mi mathvariant=
"italic">n
</mml:mi>
366 <mml:mo>⁡</mml:mo>
367 <mml:mfenced open=
"(" close=
")">
368 <mml:mover><mml:mi mathvariant=
"italic">u
</mml:mi><mml:mo>^</mml:mo></mml:mover>
371 </mml:math></inlineequation>
373 <inlineequation><mml:math><mml:mi mathvariant=
"italic">i
</mml:mi></mml:math></inlineequation>th
374 Bernstein polynomial of degree
375 <inlineequation><mml:math><mml:mi mathvariant=
"italic">n
</mml:mi></mml:math></inlineequation>
376 (
<parameter>uorder
</parameter> =
377 <inlineequation><mml:math>
380 <mml:mi mathvariant=
"italic">n
</mml:mi>
384 </mml:math></inlineequation>)
387 <informalequation><mml:math>
388 <!-- eqn: {B sub i} sup n ( u hat ) = left ( {cpile { n above i }} right) {u hat} sup i { ( 1 - u hat ) sup { n - i } }:-->
391 <mml:msup><mml:mfenced open=
"" close=
"">
392 <mml:msub><mml:mi mathvariant=
"italic">B
</mml:mi>
393 <mml:mi mathvariant=
"italic">i
</mml:mi>
396 <mml:mi mathvariant=
"italic">n
</mml:mi>
398 <mml:mo>⁡</mml:mo>
399 <mml:mfenced open=
"(" close=
")">
400 <mml:mover><mml:mi mathvariant=
"italic">u
</mml:mi><mml:mo>^</mml:mo></mml:mover>
405 <mml:mfenced open=
"(" close=
")">
406 <mml:mfenced open=
"" close=
"">
409 <mml:mi mathvariant=
"italic">n
</mml:mi>
412 <mml:mi mathvariant=
"italic">i
</mml:mi>
417 <mml:mo>⁢</mml:mo>
418 <mml:msup><mml:mfenced open=
"" close=
"">
419 <mml:mover><mml:mi mathvariant=
"italic">u
</mml:mi><mml:mo>^</mml:mo></mml:mover>
421 <mml:mi mathvariant=
"italic">i
</mml:mi>
423 <mml:mo>⁢</mml:mo>
424 <mml:mfenced open=
"" close=
"">
425 <mml:msup><mml:mfenced open=
"(" close=
")">
429 <mml:mover><mml:mi mathvariant=
"italic">u
</mml:mi><mml:mo>^</mml:mo></mml:mover>
432 <mml:mfenced open=
"" close=
"">
434 <mml:mi mathvariant=
"italic">n
</mml:mi>
436 <mml:mi mathvariant=
"italic">i
</mml:mi>
443 </mml:math></informalequation>
447 <inlineequation><mml:math>
448 <!-- eqn: {B sub j} sup m ( v hat ):-->
450 <mml:msup><mml:mfenced open=
"" close=
"">
451 <mml:msub><mml:mi mathvariant=
"italic">B
</mml:mi>
452 <mml:mi mathvariant=
"italic">j
</mml:mi>
455 <mml:mi mathvariant=
"italic">m
</mml:mi>
457 <mml:mo>⁡</mml:mo>
458 <mml:mfenced open=
"(" close=
")">
459 <mml:mover><mml:mi mathvariant=
"italic">v
</mml:mi><mml:mo>^</mml:mo></mml:mover>
462 </mml:math></inlineequation>
464 <inlineequation><mml:math><mml:mi mathvariant=
"italic">j
</mml:mi></mml:math></inlineequation>th
465 Bernstein polynomial of degree
466 <inlineequation><mml:math><mml:mi mathvariant=
"italic">m
</mml:mi></mml:math></inlineequation>
467 (
<parameter>vorder
</parameter> =
468 <inlineequation><mml:math>
471 <mml:mi mathvariant=
"italic">m
</mml:mi>
475 </mml:math></inlineequation>)
478 <informalequation><mml:math>
479 <!-- eqn: {B sub j} sup m ( v hat ) = left ( {cpile { m above j }} right ) {v hat} sup j { ( 1 - v hat ) sup { m - j } }:-->
482 <mml:msup><mml:mfenced open=
"" close=
"">
483 <mml:msub><mml:mi mathvariant=
"italic">B
</mml:mi>
484 <mml:mi mathvariant=
"italic">j
</mml:mi>
487 <mml:mi mathvariant=
"italic">m
</mml:mi>
489 <mml:mo>⁡</mml:mo>
490 <mml:mfenced open=
"(" close=
")">
491 <mml:mover><mml:mi mathvariant=
"italic">v
</mml:mi><mml:mo>^</mml:mo></mml:mover>
496 <mml:mfenced open=
"(" close=
")">
497 <mml:mfenced open=
"" close=
"">
500 <mml:mi mathvariant=
"italic">m
</mml:mi>
503 <mml:mi mathvariant=
"italic">j
</mml:mi>
508 <mml:mo>⁢</mml:mo>
509 <mml:msup><mml:mfenced open=
"" close=
"">
510 <mml:mover><mml:mi mathvariant=
"italic">v
</mml:mi><mml:mo>^</mml:mo></mml:mover>
512 <mml:mi mathvariant=
"italic">j
</mml:mi>
514 <mml:mo>⁢</mml:mo>
515 <mml:mfenced open=
"" close=
"">
516 <mml:msup><mml:mfenced open=
"(" close=
")">
520 <mml:mover><mml:mi mathvariant=
"italic">v
</mml:mi><mml:mo>^</mml:mo></mml:mover>
523 <mml:mfenced open=
"" close=
"">
525 <mml:mi mathvariant=
"italic">m
</mml:mi>
527 <mml:mi mathvariant=
"italic">j
</mml:mi>
534 </mml:math></informalequation>
538 <inlineequation><mml:math>
539 <!-- eqn: 0 sup 0 == 1:-->
541 <mml:msup><mml:mn>0</mml:mn>
547 </mml:math></inlineequation>
549 <inlineequation><mml:math>
550 <!-- eqn: left ( {cpile { n above 0 }} right ) == 1:-->
552 <mml:mfenced open=
"(" close=
")">
553 <mml:mfenced open=
"" close=
"">
556 <mml:mi mathvariant=
"italic">n
</mml:mi>
567 </mml:math></inlineequation>
570 <function>glMap2
</function> is used to define the basis and to specify what kind of values
573 a map can be enabled and disabled by calling
<citerefentry><refentrytitle>glEnable
</refentrytitle></citerefentry> and
<citerefentry><refentrytitle>glDisable
</refentrytitle></citerefentry>
574 with the map name, one of the nine predefined values for
<parameter>target
</parameter>,
576 When
<citerefentry><refentrytitle>glEvalCoord2
</refentrytitle></citerefentry> presents values
577 <inlineequation><mml:math><mml:mi mathvariant=
"italic">u
</mml:mi></mml:math></inlineequation>
579 <inlineequation><mml:math><mml:mi mathvariant=
"italic">v
</mml:mi></mml:math></inlineequation>,
580 the bivariate Bernstein polynomials are evaluated using
581 <inlineequation><mml:math>
583 <mml:mover><mml:mi mathvariant=
"italic">u
</mml:mi><mml:mo>^</mml:mo></mml:mover>
584 </mml:math></inlineequation>
586 <inlineequation><mml:math>
588 <mml:mover><mml:mi mathvariant=
"italic">v
</mml:mi><mml:mo>^</mml:mo></mml:mover>
589 </mml:math></inlineequation>,
593 <inlineequation><mml:math>
594 <!-- eqn: u hat = {u - u1} over {u2 - u1}:-->
596 <mml:mover><mml:mi mathvariant=
"italic">u
</mml:mi><mml:mo>^</mml:mo></mml:mover>
599 <mml:mfenced open=
"" close=
"">
601 <mml:mi mathvariant=
"italic">u
</mml:mi>
603 <mml:mi mathvariant=
"italic">u1
</mml:mi>
606 <mml:mfenced open=
"" close=
"">
608 <mml:mi mathvariant=
"italic">u2
</mml:mi>
610 <mml:mi mathvariant=
"italic">u1
</mml:mi>
615 </mml:math></inlineequation>
618 <inlineequation><mml:math>
619 <!-- eqn: v hat = {v - v1} over {v2 - v1}:-->
621 <mml:mover><mml:mi mathvariant=
"italic">v
</mml:mi><mml:mo>^</mml:mo></mml:mover>
624 <mml:mfenced open=
"" close=
"">
626 <mml:mi mathvariant=
"italic">v
</mml:mi>
628 <mml:mi mathvariant=
"italic">v1
</mml:mi>
631 <mml:mfenced open=
"" close=
"">
633 <mml:mi mathvariant=
"italic">v2
</mml:mi>
635 <mml:mi mathvariant=
"italic">v1
</mml:mi>
640 </mml:math></inlineequation>
643 <parameter>target
</parameter> is a symbolic constant that indicates what kind of control points
644 are provided in
<parameter>points
</parameter>,
645 and what output is generated when the map is evaluated.
646 It can assume one of nine predefined values:
650 <term><constant>GL_MAP2_VERTEX_3
</constant></term>
653 Each control point is three floating-point values representing
654 <inlineequation><mml:math><mml:mi mathvariant=
"italic">x
</mml:mi></mml:math></inlineequation>,
655 <inlineequation><mml:math><mml:mi mathvariant=
"italic">y
</mml:mi></mml:math></inlineequation>,
657 <inlineequation><mml:math><mml:mi mathvariant=
"italic">z
</mml:mi></mml:math></inlineequation>.
658 Internal
<citerefentry><refentrytitle>glVertex3
</refentrytitle></citerefentry> commands are generated when the map is evaluated.
663 <term><constant>GL_MAP2_VERTEX_4
</constant></term>
666 Each control point is four floating-point values representing
667 <inlineequation><mml:math><mml:mi mathvariant=
"italic">x
</mml:mi></mml:math></inlineequation>,
668 <inlineequation><mml:math><mml:mi mathvariant=
"italic">y
</mml:mi></mml:math></inlineequation>,
669 <inlineequation><mml:math><mml:mi mathvariant=
"italic">z
</mml:mi></mml:math></inlineequation>,
671 <inlineequation><mml:math><mml:mi mathvariant=
"italic">w
</mml:mi></mml:math></inlineequation>.
672 Internal
<citerefentry><refentrytitle>glVertex4
</refentrytitle></citerefentry> commands are generated when the map is evaluated.
677 <term><constant>GL_MAP2_INDEX
</constant></term>
680 Each control point is a single floating-point value representing a color index.
681 Internal
<citerefentry><refentrytitle>glIndex
</refentrytitle></citerefentry> commands are generated when the map is evaluated
682 but the current index is not updated with the value of these
683 <citerefentry><refentrytitle>glIndex
</refentrytitle></citerefentry> commands.
688 <term><constant>GL_MAP2_COLOR_4
</constant></term>
691 Each control point is four floating-point values representing
692 red, green, blue, and alpha.
693 Internal
<citerefentry><refentrytitle>glColor4
</refentrytitle></citerefentry> commands are generated when the map is
694 evaluated but the current color is not updated with the value of
695 these
<citerefentry><refentrytitle>glColor4
</refentrytitle></citerefentry> commands.
700 <term><constant>GL_MAP2_NORMAL
</constant></term>
703 Each control point is three floating-point values representing
705 <inlineequation><mml:math><mml:mi mathvariant=
"italic">x
</mml:mi></mml:math></inlineequation>,
706 <inlineequation><mml:math><mml:mi mathvariant=
"italic">y
</mml:mi></mml:math></inlineequation>,
708 <inlineequation><mml:math><mml:mi mathvariant=
"italic">z
</mml:mi></mml:math></inlineequation>
709 components of a normal vector.
710 Internal
<citerefentry><refentrytitle>glNormal
</refentrytitle></citerefentry> commands are generated when the map is
711 evaluated but the current normal is not updated with the value of
712 these
<citerefentry><refentrytitle>glNormal
</refentrytitle></citerefentry> commands.
717 <term><constant>GL_MAP2_TEXTURE_COORD_1
</constant></term>
720 Each control point is a single floating-point value representing
722 <inlineequation><mml:math><mml:mi mathvariant=
"italic">s
</mml:mi></mml:math></inlineequation>
725 <citerefentry><refentrytitle>glTexCoord1
</refentrytitle></citerefentry> commands are generated when the map is evaluated but
726 the current texture coordinates are not updated with the value
727 of these
<citerefentry><refentrytitle>glTexCoord
</refentrytitle></citerefentry> commands.
732 <term><constant>GL_MAP2_TEXTURE_COORD_2
</constant></term>
735 Each control point is two floating-point values representing
737 <inlineequation><mml:math><mml:mi mathvariant=
"italic">s
</mml:mi></mml:math></inlineequation>
739 <inlineequation><mml:math><mml:mi mathvariant=
"italic">t
</mml:mi></mml:math></inlineequation>
742 <citerefentry><refentrytitle>glTexCoord2
</refentrytitle></citerefentry> commands are generated when the map is evaluated but
743 the current texture coordinates are not updated with the value
744 of these
<citerefentry><refentrytitle>glTexCoord
</refentrytitle></citerefentry> commands.
749 <term><constant>GL_MAP2_TEXTURE_COORD_3
</constant></term>
752 Each control point is three floating-point values representing
754 <inlineequation><mml:math><mml:mi mathvariant=
"italic">s
</mml:mi></mml:math></inlineequation>,
755 <inlineequation><mml:math><mml:mi mathvariant=
"italic">t
</mml:mi></mml:math></inlineequation>,
757 <inlineequation><mml:math><mml:mi mathvariant=
"italic">r
</mml:mi></mml:math></inlineequation>
759 Internal
<citerefentry><refentrytitle>glTexCoord3
</refentrytitle></citerefentry> commands are generated when the map is
760 evaluated but the current texture coordinates are not updated with the value
761 of these
<citerefentry><refentrytitle>glTexCoord
</refentrytitle></citerefentry> commands.
766 <term><constant>GL_MAP2_TEXTURE_COORD_4
</constant></term>
769 Each control point is four floating-point values representing
771 <inlineequation><mml:math><mml:mi mathvariant=
"italic">s
</mml:mi></mml:math></inlineequation>,
772 <inlineequation><mml:math><mml:mi mathvariant=
"italic">t
</mml:mi></mml:math></inlineequation>,
773 <inlineequation><mml:math><mml:mi mathvariant=
"italic">r
</mml:mi></mml:math></inlineequation>,
775 <inlineequation><mml:math><mml:mi mathvariant=
"italic">q
</mml:mi></mml:math></inlineequation>
778 <citerefentry><refentrytitle>glTexCoord4
</refentrytitle></citerefentry> commands are generated when the map is evaluated but the current texture coordinates are not updated with the value
779 of these
<citerefentry><refentrytitle>glTexCoord
</refentrytitle></citerefentry> commands.
785 <parameter>ustride
</parameter>,
786 <parameter>uorder
</parameter>,
787 <parameter>vstride
</parameter>,
788 <parameter>vorder
</parameter>, and
789 <parameter>points
</parameter> define the array addressing for accessing the control points.
790 <parameter>points
</parameter> is the location of the first control point,
791 which occupies one, two, three, or four contiguous memory locations,
792 depending on which map is being defined.
794 <inlineequation><mml:math>
795 <!-- eqn: uorder times vorder:-->
797 <mml:mi mathvariant=
"italic">uorder
</mml:mi>
798 <mml:mo>×</mml:mo>
799 <mml:mi mathvariant=
"italic">vorder
</mml:mi>
801 </mml:math></inlineequation>
802 control points in the array.
803 <parameter>ustride
</parameter> specifies how many float or double locations are skipped to advance
804 the internal memory pointer from control point
805 <inlineequation><mml:math>
806 <!-- eqn: R sub {i j}:-->
807 <mml:msub><mml:mi mathvariant=
"italic">R
</mml:mi>
808 <mml:mfenced open=
"" close=
"">
810 <mml:mi mathvariant=
"italic">i
</mml:mi>
811 <mml:mo>⁢</mml:mo>
812 <mml:mi mathvariant=
"italic">j
</mml:mi>
816 </mml:math></inlineequation>
818 <inlineequation><mml:math>
819 <!-- eqn: R sub {(i+1) j}:-->
820 <mml:msub><mml:mi mathvariant=
"italic">R
</mml:mi>
821 <mml:mfenced open=
"" close=
"">
823 <mml:mfenced open=
"(" close=
")">
825 <mml:mi mathvariant=
"italic">i
</mml:mi>
830 <mml:mo>⁢</mml:mo>
831 <mml:mi mathvariant=
"italic">j
</mml:mi>
835 </mml:math></inlineequation>.
836 <parameter>vstride
</parameter> specifies how many float or double locations are skipped to advance
837 the internal memory pointer from control point
838 <inlineequation><mml:math>
839 <!-- eqn: R sub {i j}:-->
840 <mml:msub><mml:mi mathvariant=
"italic">R
</mml:mi>
841 <mml:mfenced open=
"" close=
"">
843 <mml:mi mathvariant=
"italic">i
</mml:mi>
844 <mml:mo>⁢</mml:mo>
845 <mml:mi mathvariant=
"italic">j
</mml:mi>
849 </mml:math></inlineequation>
851 <inlineequation><mml:math>
852 <!-- eqn: R sub {i (j+1) }:-->
853 <mml:msub><mml:mi mathvariant=
"italic">R
</mml:mi>
854 <mml:mfenced open=
"" close=
"">
856 <mml:mi mathvariant=
"italic">i
</mml:mi>
857 <mml:mo>⁡</mml:mo>
858 <mml:mfenced open=
"(" close=
")">
860 <mml:mi mathvariant=
"italic">j
</mml:mi>
868 </mml:math></inlineequation>.
871 <refsect1 id=
"notes"><title>Notes
</title>
873 As is the case with all GL commands that accept pointers to data,
874 it is as if the contents of
<parameter>points
</parameter> were copied by
<function>glMap2
</function> before
<function>glMap2
</function>
876 Changes to the contents of
<parameter>points
</parameter> have no effect after
<function>glMap2
</function> is called.
879 Initially,
<constant>GL_AUTO_NORMAL
</constant> is enabled. If
<constant>GL_AUTO_NORMAL
</constant> is enabled,
880 normal vectors are generated when either
881 <constant>GL_MAP2_VERTEX_3
</constant> or
<constant>GL_MAP2_VERTEX_4
</constant> is used to generate
885 <refsect1 id=
"errors"><title>Errors
</title>
887 <constant>GL_INVALID_ENUM
</constant> is generated if
<parameter>target
</parameter> is not an accepted value.
890 <constant>GL_INVALID_VALUE
</constant> is generated if
<parameter>u1
</parameter> is equal to
<parameter>u2
</parameter>,
891 or if
<parameter>v1
</parameter> is equal to
<parameter>v2
</parameter>.
894 <constant>GL_INVALID_VALUE
</constant> is generated if either
<parameter>ustride
</parameter> or
<parameter>vstride
</parameter>
895 is less than the number of values in a control point.
898 <constant>GL_INVALID_VALUE
</constant> is generated if either
<parameter>uorder
</parameter> or
<parameter>vorder
</parameter>
899 is less than
1 or greater than the return value of
<constant>GL_MAX_EVAL_ORDER
</constant>.
902 <constant>GL_INVALID_OPERATION
</constant> is generated if
<function>glMap2
</function>
903 is executed between the execution of
904 <citerefentry><refentrytitle>glBegin
</refentrytitle></citerefentry>
905 and the corresponding execution of
<citerefentry><refentrytitle>glEnd
</refentrytitle></citerefentry>.
908 <constant>GL_INVALID_OPERATION
</constant> is generated if
<function>glMap2
</function> is called and the value
909 of
<constant>GL_ACTIVE_TEXTURE
</constant> is not
<constant>GL_TEXTURE0
</constant>.
912 <refsect1 id=
"associatedgets"><title>Associated Gets
</title>
914 <citerefentry><refentrytitle>glGetMap
</refentrytitle></citerefentry>
917 <citerefentry><refentrytitle>glGet
</refentrytitle></citerefentry> with argument
<constant>GL_MAX_EVAL_ORDER
</constant>
920 <citerefentry><refentrytitle>glIsEnabled
</refentrytitle></citerefentry> with argument
<constant>GL_MAP2_VERTEX_3
</constant>
923 <citerefentry><refentrytitle>glIsEnabled
</refentrytitle></citerefentry> with argument
<constant>GL_MAP2_VERTEX_4
</constant>
926 <citerefentry><refentrytitle>glIsEnabled
</refentrytitle></citerefentry> with argument
<constant>GL_MAP2_INDEX
</constant>
929 <citerefentry><refentrytitle>glIsEnabled
</refentrytitle></citerefentry> with argument
<constant>GL_MAP2_COLOR_4
</constant>
932 <citerefentry><refentrytitle>glIsEnabled
</refentrytitle></citerefentry> with argument
<constant>GL_MAP2_NORMAL
</constant>
935 <citerefentry><refentrytitle>glIsEnabled
</refentrytitle></citerefentry> with argument
<constant>GL_MAP2_TEXTURE_COORD_1
</constant>
938 <citerefentry><refentrytitle>glIsEnabled
</refentrytitle></citerefentry> with argument
<constant>GL_MAP2_TEXTURE_COORD_2
</constant>
941 <citerefentry><refentrytitle>glIsEnabled
</refentrytitle></citerefentry> with argument
<constant>GL_MAP2_TEXTURE_COORD_3
</constant>
944 <citerefentry><refentrytitle>glIsEnabled
</refentrytitle></citerefentry> with argument
<constant>GL_MAP2_TEXTURE_COORD_4
</constant>
947 <refsect1 id=
"seealso"><title>See Also
</title>
949 <citerefentry><refentrytitle>glBegin
</refentrytitle></citerefentry>,
950 <citerefentry><refentrytitle>glColor
</refentrytitle></citerefentry>,
951 <citerefentry><refentrytitle>glEnable
</refentrytitle></citerefentry>,
952 <citerefentry><refentrytitle>glEvalCoord
</refentrytitle></citerefentry>,
953 <citerefentry><refentrytitle>glEvalMesh
</refentrytitle></citerefentry>,
954 <citerefentry><refentrytitle>glEvalPoint
</refentrytitle></citerefentry>,
955 <citerefentry><refentrytitle>glMap1
</refentrytitle></citerefentry>,
956 <citerefentry><refentrytitle>glMapGrid
</refentrytitle></citerefentry>,
957 <citerefentry><refentrytitle>glNormal
</refentrytitle></citerefentry>,
958 <citerefentry><refentrytitle>glTexCoord
</refentrytitle></citerefentry>,
959 <citerefentry><refentrytitle>glVertex
</refentrytitle></citerefentry>
962 <refsect1 id=
"Copyright"><title>Copyright
</title>
964 Copyright
<trademark class=
"copyright"></trademark> 1991-
2006
965 Silicon Graphics, Inc. This document is licensed under the SGI
966 Free Software B License. For details, see
967 <ulink url=
"http://oss.sgi.com/projects/FreeB/">http://oss.sgi.com/projects/FreeB/
</ulink>.