Contents / Previous / Next


2D Evenly Spaced Coordinate Grid: glMapGrid2f, gl.glEvalMesh2

In two dimensions, the glMapGrid2*() and glEvalMesh2() commands are similar to the one-dimensional versions, except that both u and v information must be included:

void glMapGrid2{fd}( 
                  GLint nu, TYPEu1, TYPEu2, 
	          GLint nv, TYPEv1, TYPEv2 );

glMapGrid2*() defines a two-dimensional map grid that goes from u1 to u2 in nu evenly spaced steps and from v1 to v2 in nv steps.


glEvalMesh2() applies this grid to all enabled evaluators:

void glEvalMesh2( GLenum mode, 
          GLint p1, GLint p2, 
	  GLint q2, GLint q2 );
The only significant difference from the one-dimensional versions of these two commands is that in glEvalMesh2(), the mode parameter can be GL_FILL as well as GL_POINT or GL_LINE. GL_FILL generates filled polygons using the quad-mesh primitive.