void glEvalMesh1( GLenummode, GLinti1, GLinti2) void glEvalMesh2( GLenummode, GLinti1, GLinti2, GLintj1, GLintj2)

*mode*- In
`glEvalMesh1`, specifies whether to compute a one-dimensional mesh of points or lines. Symbolic constantsand**GL_POINT**are accepted.**GL_LINE** ,*i1**i2*- Specify the first and last integer values for grid domain variable
*i*. *mode*- In
`glEvalMesh2`, specifies whether to compute a two-dimensional mesh of points, lines, or polygons. Symbolic constants,**GL_POINT**, and**GL_LINE**are accepted.**GL_FILL** ,*i1**i2*- Specify the first and last integer values for grid domain variable
*i*. ,*j1**j2*- Specify the first and last integer values for grid domain variable
*j*.

In the one-dimensional case, `glEvalMesh1`, the mesh is generated as if
the following code fragment were executed:

glBegin (wheretype); for (i=i1;ii2;i+= 1) glEvalCoord1(i·u+u_{1}) glEnd();

*u* =
(*u*_{2}
*u*_{1}) / *n*

and *n*, *u*_{1}, and *u*_{2} are the arguments
to the most recent `glMapGrid1`
command. *type* is ` GL_POINTS` if

In the two-dimensional case, `glEvalMesh2`, let

*u* =
(*u*_{2}
*u*_{1}) / *n*

*v* =
(*v*_{2}
*v*_{1}) / *m*,

where *n*, *u*_{1}, *u*_{2}, *m*,
*v*_{1}, and *v*_{2} are the arguments to the most
recent `glMapGrid2` command. Then, if
` mode` is

for (j=j1;j<j2;j+= 1) { glBegin (GL_QUAD_STRIP); for (i=i1;ii2;i+= 1) { glEvalCoord2(i·u+u_{1},j·v+v_{1}); glEvalCoord2(i·u+u_{1}, (j+ 1)·v+v_{1}); } glEnd(); }

If ` mode` is

for (j=j1;jj2;j+= 1) { glBegin(GL_LINE_STRIP); for (i=i1;ii2;i+= 1) glEvalCoord2(i·u+u_{1},j·v+v_{1}); glEnd(); } for (i=i1;ii2;i+= 1) { glBegin(); for (GL_LINE_STRIPj=j1;jj1;j+= 1) glEvalCoord2(i·u+u_{1},j·v+v_{1}); glEnd(); }

And finally, if ` mode` is

glBegin(); for (GL_POINTSj=j1;jj2;j+= 1) { for (i=i1;ii2;·i+= 1) { glEvalCoord2(i·u+u_{1}, jv+v_{1}); } } glEnd();

In all three cases, the only absolute numeric requirements are that if
*i*=*n*, then the value computed from *i*·*u* + *u*_{1} is
exactly *u*_{2}, and if *j*=*m*, then the value
computed from *j*·*v* + *v*_{1} is exactly *v*_{2}.

is generated if**GL_INVALID_ENUM**is not an accepted value.*mode*is generated if**GL_INVALID_OPERATION**`glEvalMesh`is executed between the execution of`glBegin`and the corresponding execution of`glEnd`.