glEvalMesh1 function

Computes a one-dimensional grid of points or lines.

Syntax

void WINAPI glEvalMesh1(
   GLenum mode,
   GLint  i1,
   GLint  i2
);

Parameters

mode

A value that specifies whether to compute a one-dimensional mesh of points or lines. The following symbolic constants are accepted: GL_POINT and GL_LINE.

i1

The first integer value for grid domain variable i.

i2

The last integer value for grid domain variable i.

Return value

This function does not return a value.

Error codes

The following error codes can be retrieved by the glGetError function.

Name Meaning
GL_INVALID_ENUM
Indicates that mode is not an accepted value.
GL_INVALID_OPERATION
The function was called between a call to glBegin and the corresponding call to glEnd.

Remarks

Use glMapGrid and glEvalMesh together to efficiently generate and evaluate a series of evenly spaced map domain values. The glEvalMesh function steps through the integer domain of a one- or two-dimensional grid, whose range is the domain of the evaluation maps specified by glMap1 and glMap2. The mode parameter determines 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?u + u1)

}

glEnd( );

where

?u = (u2 u1) / n

and n, u1, and u2 are the arguments to the most recent glMapGrid1 function. The type parameter is GL_POINTS if mode is GL_POINT, or GL_LINES if mode is GL_LINE. The one absolute numeric requirement is that if i = n, then the value computed from i?u + u1 is exactly u2.

Requirements

Requirement Value
Minimum supported client
Windows 2000 Professional [desktop apps only]
Minimum supported server
Windows 2000 Server [desktop apps only]
Header
Gl.h
Library
Opengl32.lib
DLL
Opengl32.dll

See also

glBegin