NAMEglEvalMesh1,glEvalMesh2- compute a one- or two-dimensional grid of points or linesCSPECIFICATIONvoidglEvalMesh1( GLenummode, GLinti1, GLinti2)PARAMETERSmodeInglEvalMesh1, specifies whether to compute a one- dimensional mesh of points or lines. Symbolic constantsGL_POINTandGL_LINEare accepted.i1,i2Specify the first and last integer values for grid domain variable i.CSPECIFICATIONvoidglEvalMesh2( GLenummode, GLinti1, GLinti2, GLintj1, GLintj2)PARAMETERSmodeInglEvalMesh2, specifies whether to compute a two- dimensional mesh of points, lines, or polygons. Symbolic constantsGL_POINT,GL_LINE, andGL_FILLare accepted.i1,i2Specify the first and last integer values for grid domain variable i.j1,j2Specify the first and last integer values for grid domain variable j.DESCRIPTIONglMapGridandglEvalMeshare used in tandem to efficiently generate and evaluate a series of evenly-spaced map domain values.glEvalMeshsteps through the integer domain of a one- or two-dimensional grid, whose range is the domain of the evaluation maps specified byglMap1andglMap2.modedetermines whether the resulting vertices are connected as points, lines, or filled polygons. In the one-dimensional case,glEvalMesh1, the mesh is generated as if the following code fragment were executed: glBegin (type); for (i =i1; i <=i2; i += 1) glEvalCoord1(i . DELTA u + u sub 1) glEnd(); where DELTA u = (u - u ) / 1 2 1 and n, u, and u are the arguments to the most recent 1 2glMapGrid1command.typeisGL_POINTSifmodeisGL_POINT, orGL_LINESifmodeisGL_LINE. The one absolute numeric requirement is that if i = n, then the value computed from i . DELTA u + u is exactly u. In the two-dimensional case,glEvalMesh2, let DELTA u = (u - u )/n 2 1 DELTA v = (v - v )/m, 2 1 where n, u , u , m, v , and v 1 2 1 2 are the arguments to the most recentglMapGrid2command. Then, ifmodeisGL_FILL, theglEvalMesh2command is equivalent to: for (j =j1; j <j2; j += 1) { glBegin (GL_QUAD_STRIP); for (i =i1; i <=i2; i += 1) { glEvalCoord2(i . DELTA u + u , j . DELTA v + v ); 1 1 glEvalCoord2(i . DELTA u + u , (j+1) . DELTA v + v ); 1 1 } glEnd(); } IfmodeisGL_LINE, then a call toglEvalMesh2is equivalent to: for (j =j1; j <=j2; j += 1) { glBegin(GL_LINE_STRIP); for (i =i1; i <=i2; i += 1) glEvalCoord2(i . DELTA u + u , j . DELTA v + v ); 1 1 glEnd(); } for (i =i1; i <=i2; i += 1) { glBegin(GL_LINE_STRIP); for (j =j1; j <=j1; j += 1) glEvalCoord2)(i . DELTA u + u , j . DELTA v + v ); 1 1 glEnd(); } And finally, ifmodeisGL_POINT, then a call toglEvalMesh2is equivalent to: glBegin (GL_POINTS); for (j =j1; j <=j2; j += 1) { for (i =i1; i <=i2; i += 1) { glEvalCoord2(i . DELTA u + u , j . DELTA v + v ); 1 1 } } glEnd(); In all three cases, the only absolute numeric requirements are that if i = n, then the value computed from i . DELTA u + u is exactly u , 1 2 and if j = m, then the value computed from j . DELTA v + v is exactly v . 1 2ERRORSGL_INVALID_ENUMis generated ifmodeis not an accepted value.GL_INVALID_OPERATIONis generated ifglEvalMeshis executed between the execution ofglBeginand the corresponding execution ofglEnd.ASSOCIATEDGETSglGetwith argumentGL_MAP1_GRID_DOMAINglGetwith argumentGL_MAP2_GRID_DOMAINglGetwith argumentGL_MAP1_GRID_SEGMENTSglGetwith argumentGL_MAP2_GRID_SEGMENTSSEEALSOglBegin,glEvalCoord,glEvalPoint,glMap1,glMap2,glMapGrid