GLEVALMESH(3G) UNIX Programmer's Manual GLEVALMESH(3G)

glEvalMesh1, glEvalMesh2- compute a one- or two-dimensional grid of points or lines

voidglEvalMesh1( GLenummode, GLinti1, GLinti2)

modeInglEvalMesh1, specifies whether to compute a one- dimensional mesh of points or lines. Symbolic con- stantsGL_POINTandGL_LINEare accepted.i1,i2Specify the first and last integer values for grid domain variable i.

voidglEvalMesh2( GLenummode, GLinti1, GLinti2, GLintj1, GLintj2)

modeInglEvalMesh2, specifies whether to compute a two- dimensional mesh of points, lines, or polygons. Sym- bolic 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.

glMapGridandglEvalMeshare 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. MirBSD #10-current Printed 2021-12-07 1 GLEVALMESH(3G) UNIX Programmer's Manual GLEVALMESH(3G) In the one-dimensional case,glEvalMesh1, the mesh is gen- erated as if the following code fragment were executed: glBegin(type);for ( i=i1; i<=i2; i+=1)glEvalCoord1( i._\_u + u1 );glEnd(); where_\_u = (u2 - u1)/n and n, u1, and u2 are the arguments to the most recentglMapGrid1command.typeisGL_POINTSifmodeisGL_POINT, orGL_LINESifmodeisGL_LINE. The one absolute numeric requirement is that if i = n, then the value computed from i._\_u + u1 is exactly u2. In the two-dimensional case,glEvalMesh2, let_\_u = (u2 - u1)/n_\_v = (v2 - v1)/m, where n, u1, u2, m, v1, and v2 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._\_u + u1, j._\_v + v1 ); glEvalCoord2( i._\_u + u1, (j+1)._\_v + v1 ); } 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._\_u + u1, j._\_v + v1 ); glEnd(); } MirBSD #10-current Printed 2021-12-07 2 GLEVALMESH(3G) UNIX Programmer's Manual GLEVALMESH(3G) for ( i =i1; i <=i2; i += 1 ) { glBegin( GL_LINE_STRIP ); for ( j =j1; j <=j1; j += 1 ) glEvalCoord2( i._\_u + u1, j._\_v + v1 ); 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._\_u + u1, j._\_v + v1 ); glEnd(); In all three cases, the only absolute numeric requirements are that if i = n, then the value computed from i._\_u + u1 is exactly u2, and if j = m, then the value computed from j._\_v + v1 is exactly v2.

GL_INVALID_ENUMis generated ifmodeis not an accepted value.GL_INVALID_OPERATIONis generated ifglEvalMeshis executed between the execution ofglBeginand the corresponding exe- cution ofglEnd.

glGetwith argumentGL_MAP1_GRID_DOMAINglGetwith argumentGL_MAP2_GRID_DOMAINglGetwith argumentGL_MAP1_GRID_SEGMENTSglGetwith argumentGL_MAP2_GRID_SEGMENTS

glBegin(3G),glEvalCoord(3G),glEvalPoint(3G),glMap1(3G),glMap2(3G),glMapGrid(3G)MirBSD #10-current Printed 2021-12-07 3