[ Previous | Next | Contents | Glossary | Home | Search ]
OpenGL 1.1 for AIX: Reference Manual

glEvalCoord Subroutine


Evaluates enabled one-dimensional (1D) and two-dimensional (2D) maps.


OpenGL C bindings library: libGL.a

C Syntax


void glEvalCoord1d(GLdouble u)
void glEvalCoord1f(GLfloat u)
void glEvalCoord2d(GLdouble u,
      GLdouble  v)
void glEvalCoord2f(GLfloat u,
      GLfloat  v)


void glEvalCoord1dv(const GLdouble *u)
void glEvalCoord1fv(const GLfloat *u)
void glEvalCoord2dv(const GLdouble *u)
void glEvalCoord2fv(const GLfloat *u)


The glEvalCoord1 subroutine evaluates enabled 1D maps at argument u. The glEvalCoord2 subroutine does the same for 2D maps using two domain values, u and v. Maps are defined with glMap1 and glMap2, and enabled and disabled with glEnable and glDisable.

When one of the glEvalCoord subroutines is issued, all currently enabled maps of the indicated dimension are evaluated. Then, for each enabled map, it is as if the corresponding GL subroutine was issued with the computed value. That is, if GL_MAP1_INDEX or GL_MAP2_INDEX is enabled, a glIndex subroutine is simulated. If GL_MAP1_COLOR_4 or GL_MAP2_COLOR_4 is enabled, a glColor subroutine is simulated. If GL_MAP1_NORMAL or GL_MAP2_NORMAL is enabled, a normal vector is produced, and if any of GL_MAP1_TEXTURE_COORD_1, GL_MAP1_TEXTURE_COORD_2, GL_MAP1_TEXTURE_COORD_3, GL_MAP1_TEXTURE_COORD_4, GL_MAP2_TEXTURE_COORD_1, GL_MAP2_TEXTURE_COORD_2, GL_MAP2_TEXTURE_COORD_3, or GL_MAP2_TEXTURE_COORD_4 is enabled, an appropriate glTexCoord subroutine is simulated.

The GL uses evaluated values instead of current values for those evaluations that are enabled, and current values otherwise, for color, color index, normal, and texture coordinates. However, the evaluated values do not update the current values. Thus if glVertex subroutines are interspersed with glEvalCoord subroutines, the color, normal, and texture coordinates associated with the glVertex subroutines will not be affected by the values generated by the glEvalCoord subroutines, but rather only by the most recent glColor, glIndex, glNormal, and glTexCoord subroutines.

No subroutines are issued for maps that are not enabled. If more than one texture evaluation is enabled for a particular dimension (for example, GL_MAP2_TEXTURE_COORD_1 and GL_MAP2_TEXTURE_COORD_2), only the evaluation of the map that produces the larger number of coordinates (in this case, GL_MAP2_TEXTURE_COORD_2) is carried out. GL_MAP1_VERTEX_4 overrides GL_MAP1_VERTEX_3, and GL_MAP2_VERTEX_4 overrides GL_MAP2_VERTEX_3 in the same manner. If neither a three-component nor a four-component vertex map is enabled for the specified dimension, the glEvalCoord subroutine is ignored.

If automatic normal generation is enabled by calling glEnable with argument GL_AUTO_NORMAL, glEvalCoord2 generates surface normals analytically, regardless of the contents or enabling of the GL_MAP2_NORMAL map. Let:

m = (delta p / delta u) (delta p / delta v)

Then the generated normal n is

n = m/||m||

If automatic normal generation is disabled, the corresponding normal map GL_MAP2_NORMAL, if enabled, is used to produce a normal. If neither automatic normal generation nor a normal map is enabled, no normal is generated for glEvalCoord2 subroutines.



u Specifies a value that is the domain coordinate u to the basis function defined in a previous glMap1 or glMap2 subroutine.
v Specifies a value that is the domain coordinate v to the basis function defined in a previous glMap2 subroutine. This argument is not present in an glEvalCoord1 subroutine.


u Specifies a pointer to an array containing either one or two domain coordinates. The first coordinate is u. The second coordinate is v, and is present only in glEvalCoord2 versions.

Associated Gets

Associated gets for the glEvalCoord subroutine are as follows. (See the glGet subroutine for more information.)

glIsEnabled with argument GL_MAP1_VERTEX_3

glIsEnabled with argument GL_MAP1_VERTEX_4

glIsEnabled with argument GL_MAP1_INDEX

glIsEnabled with argument GL_MAP1_COLOR_4

glIsEnabled with argument GL_MAP1_NORMAL

glIsEnabled with argument GL_MAP1_TEXTURE_COORD_1

glIsEnabled with argument GL_MAP1_TEXTURE_COORD_2

glIsEnabled with argument GL_MAP1_TEXTURE_COORD_3

glIsEnabled with argument GL_MAP1_TEXTURE_COORD_4

glIsEnabled with argument GL_MAP2_VERTEX_3

glIsEnabled with argument GL_MAP2_VERTEX_4

glIsEnabled with argument GL_MAP2_INDEX

glIsEnabled with argument GL_MAP2_COLOR_4

glIsEnabled with argument GL_MAP2_NORMAL

glIsEnabled with argument GL_MAP2_TEXTURE_COORD_1

glIsEnabled with argument GL_MAP2_TEXTURE_COORD_2

glIsEnabled with argument GL_MAP2_TEXTURE_COORD_3

glIsEnabled with argument GL_MAP2_TEXTURE_COORD_4

glIsEnabled with argument GL_AUTO_NORMAL



/usr/include/GL/gl.h Contains C language constants, variable type definitions, and ANSI function prototypes for OpenGL.

Related Information

The glBegin or glEnd subroutine, glColor subroutine, glEnable or Disable subroutine, glEvalMesh subroutine, glEvalPoint subroutine, glIndex subroutine, glMap1 subroutine, glMap2 subroutine, glMapGrid subroutine, glNormal subroutine, glTexCoord subroutine, glVertex subroutine.

OpenGL Overview.

[ Previous | Next | Contents | Glossary | Home | Search ]