glMapGrid2d function
Defines a onedimensional mesh.
Syntax
void WINAPI glMapGrid2d(
GLint un,
GLdouble u1,
GLdouble u2,
GLint vn,
GLdouble v1,
GLdouble v2
);
Parameters
 un

The number of partitions in the grid range interval [u1, u2]. This value must be positive.
 u1

A value used as the mapping for integer grid domain value i = 0.
 u2

A value used as the mapping for integer grid domain value i = un.
 vn

The number of partitions in the grid range interval [v1, v2].
 v1

A value used as the mapping for integer grid domain value j = 0.
 v2

A value used as the mapping for integer grid domain value j = vn.
Return value
This function does not return a value.
Error codes
The following error codes can be retrieved by the glGetError function.
Name  Meaning 


Either un or vn was not positive. 

The function was called between a call to glBegin and the corresponding call to glEnd. 
Error codes
The following error codes can be retrieved by the glGetError function.
Name  Meaning 


Either un or vn was not positive. 

The function was called between a call to glBegin and the corresponding call to glEnd. 
Remarks
The glMapGrid and glEvalMesh functions are used in tandem 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 twodimensional grid, whose range is the domain of the evaluation maps specified by glMap1 and glMap2.
The glMapGrid1 and glMapGrid2 functions specify the linear grid mappings between the i (or i and j) integer grid coordinates, to the u (or u and v) floatingpoint evaluation map coordinates. See glMap1 and glMap2 for details of how u and v coordinates are evaluated.
The glMapGrid1 function specifies a single linear mapping such that integer grid coordinate 0 maps exactly to u1, and integer grid coordinate un maps exactly to u2. All other integer grid coordinates i are mapped such that:
u = i(u2 u1)/un + u1
The glMapGrid2 function specifies two such linear mappings. One maps integer grid coordinate i = 0 exactly to u1, and integer grid coordinate i = un exactly to u2. The other maps integer grid coordinate j = 0 exactly to v1, and integer grid coordinate j = vn exactly to v2. Other integer grid coordinates i and j are mapped such that
u = i(u2 u1)/un + u1
v = j (v2 v1)/vn + v1
The mappings specified by glMapGrid are used identically by glEvalMesh and glEvalPoint.
The following functions retrieve information related to glMapGrid:
 glGet with argument GL_MAP1_GRID_DOMAIN
 glGet with argument GL_MAP2_GRID_DOMAIN
 glGet with argument GL_MAP1_GRID_SEGMENTS
 glGet with argument GL_MAP2_GRID_SEGMENTS
Requirements
Minimum supported client  Windows 2000 Professional [desktop apps only] 

Minimum supported server  Windows 2000 Server [desktop apps only] 
Header 

Library 

DLL 

See also