1GLMAP1(3G)                       OpenGL Manual                      GLMAP1(3G)
2
3
4

NAME

6       glMap1 - define a one-dimensional evaluator
7

C SPECIFICATION

9       void glMap1f(GLenum target, GLfloat u1, GLfloat u2, GLint stride,
10                    GLint order, const GLfloat * points);
11
12       void glMap1d(GLenum target, GLdouble u1, GLdouble u2, GLint stride,
13                    GLint order, const GLdouble * points);
14

PARAMETERS

16       target
17           Specifies the kind of values that are generated by the evaluator.
18           Symbolic constants GL_MAP1_VERTEX_3, GL_MAP1_VERTEX_4,
19           GL_MAP1_INDEX, GL_MAP1_COLOR_4, GL_MAP1_NORMAL,
20           GL_MAP1_TEXTURE_COORD_1, GL_MAP1_TEXTURE_COORD_2,
21           GL_MAP1_TEXTURE_COORD_3, and GL_MAP1_TEXTURE_COORD_4 are accepted.
22
23       u1, u2
24           Specify a linear mapping of u, as presented to glEvalCoord1(), to
25           u^, the variable that is evaluated by the equations specified by
26           this command.
27
28       stride
29           Specifies the number of floats or doubles between the beginning of
30           one control point and the beginning of the next one in the data
31           structure referenced in points. This allows control points to be
32           embedded in arbitrary data structures. The only constraint is that
33           the values for a particular control point must occupy contiguous
34           memory locations.
35
36       order
37           Specifies the number of control points. Must be positive.
38
39       points
40           Specifies a pointer to the array of control points.
41

DESCRIPTION

43       Evaluators provide a way to use polynomial or rational polynomial
44       mapping to produce vertices, normals, texture coordinates, and colors.
45       The values produced by an evaluator are sent to further stages of GL
46       processing just as if they had been presented using glVertex(),
47       glNormal(), glTexCoord(), and glColor() commands, except that the
48       generated values do not update the current normal, texture coordinates,
49       or color.
50
51       All polynomial or rational polynomial splines of any degree (up to the
52       maximum degree supported by the GL implementation) can be described
53       using evaluators. These include almost all splines used in computer
54       graphics: B-splines, Bezier curves, Hermite splines, and so on.
55
56       Evaluators define curves based on Bernstein polynomials. Define p ⁡ u^
57       as
58
59       p ⁡ u^ = Σ i = 0 n B i n ⁡ u^ ⁢ R i
60
61       where R i is a control point and B i n ⁡ u^ is the ith Bernstein
62       polynomial of degree n (order = n + 1):
63
64       B i n ⁡ u^ = n i ⁢ u^ i ⁢ 1 - u^ n - i
65
66       Recall that
67
68       0 0 == 1 and n 0 == 1
69
70       glMap1 is used to define the basis and to specify what kind of values
71       are produced. Once defined, a map can be enabled and disabled by
72       calling glEnable() and glDisable() with the map name, one of the nine
73       predefined values for target described below.  glEvalCoord1() evaluates
74       the one-dimensional maps that are enabled. When glEvalCoord1() presents
75       a value u, the Bernstein functions are evaluated using u^, where u^ = u
76       - u1 u2 - u1
77
78       target is a symbolic constant that indicates what kind of control
79       points are provided in points, and what output is generated when the
80       map is evaluated. It can assume one of nine predefined values:
81
82       GL_MAP1_VERTEX_3
83           Each control point is three floating-point values representing x,
84           y, and z. Internal glVertex3() commands are generated when the map
85           is evaluated.
86
87       GL_MAP1_VERTEX_4
88           Each control point is four floating-point values representing x, y,
89           z, and w. Internal glVertex4() commands are generated when the map
90           is evaluated.
91
92       GL_MAP1_INDEX
93           Each control point is a single floating-point value representing a
94           color index. Internal glIndex() commands are generated when the map
95           is evaluated but the current index is not updated with the value of
96           these glIndex() commands.
97
98       GL_MAP1_COLOR_4
99           Each control point is four floating-point values representing red,
100           green, blue, and alpha. Internal glColor4() commands are generated
101           when the map is evaluated but the current color is not updated with
102           the value of these glColor4() commands.
103
104       GL_MAP1_NORMAL
105           Each control point is three floating-point values representing the
106           x, y, and z components of a normal vector. Internal glNormal()
107           commands are generated when the map is evaluated but the current
108           normal is not updated with the value of these glNormal() commands.
109
110       GL_MAP1_TEXTURE_COORD_1
111           Each control point is a single floating-point value representing
112           the s texture coordinate. Internal glTexCoord1() commands are
113           generated when the map is evaluated but the current texture
114           coordinates are not updated with the value of these glTexCoord()
115           commands.
116
117       GL_MAP1_TEXTURE_COORD_2
118           Each control point is two floating-point values representing the s
119           and t texture coordinates. Internal glTexCoord2() commands are
120           generated when the map is evaluated but the current texture
121           coordinates are not updated with the value of these glTexCoord()
122           commands.
123
124       GL_MAP1_TEXTURE_COORD_3
125           Each control point is three floating-point values representing the
126           s, t, and r texture coordinates. Internal glTexCoord3() commands
127           are generated when the map is evaluated but the current texture
128           coordinates are not updated with the value of these glTexCoord()
129           commands.
130
131       GL_MAP1_TEXTURE_COORD_4
132           Each control point is four floating-point values representing the
133           s, t, r, and q texture coordinates. Internal glTexCoord4() commands
134           are generated when the map is evaluated but the current texture
135           coordinates are not updated with the value of these glTexCoord()
136           commands.
137
138       stride, order, and points define the array addressing for accessing the
139       control points.  points is the location of the first control point,
140       which occupies one, two, three, or four contiguous memory locations,
141       depending on which map is being defined.  order is the number of
142       control points in the array.  stride specifies how many float or double
143       locations to advance the internal memory pointer to reach the next
144       control point.
145

NOTES

147       As is the case with all GL commands that accept pointers to data, it is
148       as if the contents of points were copied by glMap1 before glMap1
149       returns. Changes to the contents of points have no effect after glMap1
150       is called.
151

ERRORS

153       GL_INVALID_ENUM is generated if target is not an accepted value.
154
155       GL_INVALID_VALUE is generated if u1 is equal to u2.
156
157       GL_INVALID_VALUE is generated if stride is less than the number of
158       values in a control point.
159
160       GL_INVALID_VALUE is generated if order is less than 1 or greater than
161       the return value of GL_MAX_EVAL_ORDER.
162
163       GL_INVALID_OPERATION is generated if glMap1 is executed between the
164       execution of glBegin() and the corresponding execution of glEnd().
165
166       GL_INVALID_OPERATION is generated if glMap1 is called and the value of
167       GL_ACTIVE_TEXTURE is not GL_TEXTURE0.
168

ASSOCIATED GETS

170       glGetMap()
171
172       glGet() with argument GL_MAX_EVAL_ORDER
173
174       glIsEnabled() with argument GL_MAP1_VERTEX_3
175
176       glIsEnabled() with argument GL_MAP1_VERTEX_4
177
178       glIsEnabled() with argument GL_MAP1_INDEX
179
180       glIsEnabled() with argument GL_MAP1_COLOR_4
181
182       glIsEnabled() with argument GL_MAP1_NORMAL
183
184       glIsEnabled() with argument GL_MAP1_TEXTURE_COORD_1
185
186       glIsEnabled() with argument GL_MAP1_TEXTURE_COORD_2
187
188       glIsEnabled() with argument GL_MAP1_TEXTURE_COORD_3
189
190       glIsEnabled() with argument GL_MAP1_TEXTURE_COORD_4
191

SEE ALSO

193       glBegin(), glColor(), glEnable(), glEvalCoord(), glEvalMesh(),
194       glEvalPoint(), glMap2(), glMapGrid(), glNormal(), glTexCoord(),
195       glVertex()
196
198       Copyright © 1991-2006 Silicon Graphics, Inc. This document is licensed
199       under the SGI Free Software B License. For details, see
200       http://oss.sgi.com/projects/FreeB/.
201

AUTHORS

203       opengl.org
204
205
206
207opengl.org                        07/13/2018                        GLMAP1(3G)
Impressum