The procedure to use two-dimensional evaluators is similar to the procedure
for one dimension:
Define the evaluator(s) with glMap2*().
Enable them by passing the appropriate value to glEnable().
Invoke them either by calling glEvalCoord2() between a glBegin()
and glEnd() pair,
or by specifying and then applying a mesh with
glMapGrid2() and glEvalMesh2().
void glMap2{fd}( GLenum target,
TYPEu1, TYPEu2, GLint ustride, GLint uorder,
TYPEv1, TYPEv2, GLint vstride, GLint vorder,
TYPE points );
The target parameter can have any of the values in the 1D Table,
except that the string MAP1 is replaced with MAP2.
Minimum and maximum values for both u and v are provided
as u1, u2, v1, and v2.
The parameters ustride
and vstride indicate the number of single- or double-precision values
(as appropriate) between independent settings for these values allows users
to select a subrectangle of control points out of a much larger array.
Evaluation of the enabled two-dimensional maps:
void glEvalCoord2{fd}{v}(TYPE u, TYPE v);
u and v are the values (or a pointer to the value, in the vector version of the command) for the domain coordinates.
If either of the vertex evaluators is enabled (GL_MAP2_VERTEX_3 or GL_MAP2_VERTEX_4), then the normal to the surface is computed analytically. This normal is associated with the generated vertex if automatic normal generation has been enabled by passing GL_AUTO_NORMAL to glEnable(). If it's disabled, the corresponding enabled normal map is used to produce a normal. If no such map exists, the current normal is used.