C SPECIFICATION
void GLAPIENTRY glMap2d( GLenum targe )
void GLAPIENTRY glMap2f( GLenum targe )
PARAMETERS
targe Specifies the kind of values that are generated by the evalua-
tor. Symbolic constants GL_MAP2_VERTEX_3, GL_MAP2_VERTEX_4,
GL_MAP2_INDEX, GL_MAP2_COLOR_4, GL_MAP2_NORMAL,
GL_MAP2_TEXTURE_COORD_1, GL_MAP2_TEXTURE_COORD_2,
GL_MAP2_TEXTURE_COORD_3, and GL_MAP2_TEXTURE_COORD_4 are
accepted.
_param2, _param3
Specify a linear mapping of u, as presented to glEvalCoord2, to
<I>u, one of the two variables that are evaluated by the equations
specified by this command. Initially, _param2 is 0 and _param3
is 1.
_param4
Specifies the number of floats or doubles between the beginning
of control point Rij and the beginning of control point R(i+1)j,
where i and j are the u and v control point indices, respec-
tively. This allows control points to be embedded in arbitrary
data structures. The only constraint is that the values for a
particular control point must occupy contiguous memory loca-
tions. The initial value of _param4 is 0.
_param5
Specifies the dimension of the control point array in the u
axis. Must be positive. The initial value is 1.
_param6, _param7
Specify a linear mapping of v, as presented to glEvalCoord2, to
<I>v, one of the two variables that are evaluated by the equations
specified by this command. Initially, _param6 is 0 and _param7
is 1.
_param8
Specifies the number of floats or doubles between the beginning
of control point Rij and the beginning of control point Ri(j+1),
where i and j are the u and v control point indices, respec-
tively. This allows control points to be embedded in arbitrary
data structures. The only constraint is that the values for a
particular control point must occupy contiguous memory loca-
tions. The initial value of _param8 is 0.
_param9
Specifies the dimension of the control point array in the v
axis. Must be positive. The initial value is 1.
graphics, including B-spline surfaces, NURBS surfaces, Bezier surfaces,
and so on.
Evaluators define surfaces based on bivariate Bernstein polynomials.
Define p(<I>u,<I>v) as
p(<I>u,<I>v)=in?0jm?0Bn<I>i(<I>u)Bm<I>j(<I>v)Rij
where Rij is a control point, Bn<I>i(<I>u) is the ith Bernstein polynomial of
degree
n (_param5 = n+1)
n
Bn<I>i(<I>u)=( )<I>ui(1-<I>u)n-i
i
and Bm<I>j(<I>v) is the jth Bernstein polynomial of degree m (_param9 = m+1)
m
Bm<I>j(<I>v)=( )<I>vj(1-<I>v)m-j
00?1 and ( )?1
0
glMap2 is used to define the basis and to specify what kind of values
are produced. Once defined, a map can be enabled and disabled by call-
ing glEnable and glDisable with the map name, one of the nine prede-
fined values for targe, described below. When glEvalCoord2 presents
values u and v, the bivariate Bernstein polynomials are evaluated using
<I>u and <I>v, where
<I>u=_e_q_n_p_u<I>a_<I>r_<I>a_e<I>m_q_n_p_a<I>e_r<I>q_a<I>n_m<I>p_<I>a_r_a_m__
<I>v=_e_q_n_p_v<I>a_<I>r_<I>a_e<I>m_q_n_p_a<I>e_r<I>q_a<I>n_m<I>p_<I>a_r_a_m__
targe is a symbolic constant that indicates what kind of control points
are provided in _param10, and what output is generated when the map is
evaluated. It can assume one of nine predefined values:
GL_MAP2_VERTEX_3 Each control point is three floating-point
values representing x, y, and z. Internal
glVertex3 commands are generated when the map
is evaluated.
GL_MAP2_VERTEX_4 Each control point is four floating-point val-
ues representing x, y, z, and w. Internal
glVertex4 commands are generated when the map
is evaluated.
GL_MAP2_INDEX Each control point is a single floating-point
value representing a color index. Internal
glIndex commands are generated when the map is
evaluated but the current index is not updated
with the value of these glIndex commands.
GL_MAP2_COLOR_4 Each control point is four floating-point val-
ues representing red, green, blue, and alpha.
Internal glColor4 commands are generated when
the map is evaluated but the current color is
not updated with the value of these glColor4
commands.
GL_MAP2_NORMAL Each control point is three floating-point
GL_MAP2_TEXTURE_COORD_2 Each control point is two floating-point val-
ues representing the s and t texture coordi-
nates. Internal
glTexCoord2 commands are generated when the
map is evaluated but the current texture coor-
dinates are not updated with the value of
these glTexCoord commands.
GL_MAP2_TEXTURE_COORD_3 Each control point is three floating-point
values representing the s, t, and r texture
coordinates. Internal glTexCoord3 commands
are generated when the map is evaluated but
the current texture coordinates are not
updated with the value of these glTexCoord
commands.
GL_MAP2_TEXTURE_COORD_4 Each control point is four floating-point val-
ues representing the s, t, r, and q texture
coordinates. Internal
glTexCoord4 commands are generated when the
map is evaluated but the current texture coor-
dinates are not updated with the value of
these glTexCoord commands.
_param4, _param5, _param8, _param9, and _param10 define the array
addressing for accessing the control points. _param10 is the location
of the first control point, which occupies one, two, three, or four
contiguous memory locations, depending on which map is being defined.
There are _eqnparam5x_eqnparam9 control points in the array. _param4
specifies how many float or double locations are skipped to advance the
internal memory pointer from control point Rij to control point
R(i+1)j. _param8 specifies how many float or double locations are
skipped to advance the internal memory pointer from control point Rij
to control point Ri(j+1).
NOTES
As is the case with all GL commands that accept pointers to data, it is
as if the contents of _param10 were copied by glMap2 before glMap2
returns. Changes to the contents of _param10 have no effect after
glMap2 is called.
Initially, GL_AUTO_NORMAL is enabled. If GL_AUTO_NORMAL is enabled,
normal vectors are generated when either GL_MAP2_VERTEX_3 or
GL_MAP2_VERTEX_4 is used to generate vertices.
ERRORS
GL_INVALID_ENUM is generated if targe is not an accepted value.
GL_INVALID_VALUE is generated if _param2 is equal to _param3, or if
_param6 is equal to _param7.
GL_INVALID_VALUE is generated if either _param4 or _param8 is less than
glGet with argument GL_MAX_EVAL_ORDER
glIsEnabled with argument GL_MAP2_VERTEX_3
glIsEnabled with argument GL_MAP2_VERTEX_4
glIsEnabled with argument GL_MAP2_INDEX
glIsEnabled with argument GL_MAP2_COLOR_4
glIsEnabled with argument GL_MAP2_NORMAL
glIsEnabled with argument GL_MAP2_TEXTURE_COORD_1
glIsEnabled with argument GL_MAP2_TEXTURE_COORD_2
glIsEnabled with argument GL_MAP2_TEXTURE_COORD_3
glIsEnabled with argument GL_MAP2_TEXTURE_COORD_4
SEE ALSO
glBegin, glColor, glEnable, glEvalCoord, glEvalMesh, glEvalPoint,
glMap1, glMapGrid, glNormal, glTexCoord, glVertex
GLMAP2(3G)
Man(1) output converted with
man2html