fglEvalCoord(3G) OpenGL Reference fglEvalCoord(3G)NAME
fglEvalCoord1d, fglEvalCoord1f, fglEvalCoord2d, fglEvalCoord2f,
fglEvalCoord1dv, fglEvalCoord1fv, fglEvalCoord2dv, fglEvalCoord2fv -
evaluate enabled one- and two-dimensional maps
FORTRAN SPECIFICATION
SUBROUTINE fglEvalCoord1d( REAL*4 u )
SUBROUTINE fglEvalCoord1f( REAL*4 u )
SUBROUTINE fglEvalCoord2d( REAL*4 u,
REAL*4 v )
SUBROUTINE fglEvalCoord2f( REAL*4 u,
REAL*4 v )
PARAMETERS
u Specifies a value that is the domain coordinate u to the basis
function defined in a previous fglMap1 or fglMap2 command.
v Specifies a value that is the domain coordinate v to the basis
function defined in a previous fglMap2 command. This argument is not
present in a fglEvalCoord1 command.
FORTRAN SPECIFICATION
SUBROUTINE fglEvalCoord1dv( CHARACTER*8 u )
SUBROUTINE fglEvalCoord1fv( CHARACTER*8 u )
SUBROUTINE fglEvalCoord2dv( CHARACTER*8 u )
SUBROUTINE fglEvalCoord2fv( CHARACTER*8 u )
PARAMETERS
u Specifies a pointer to an array containing either one or two domain
coordinates. The first coordinate is u. The second coordinate is
v, which is present only in fglEvalCoord2 versions.
DESCRIPTION
fglEvalCoord1 evaluates enabled one-dimensional maps at argument u.
fglEvalCoord2 does the same for two-dimensional maps using two domain
values, u and v. To define a map, call fglMap1 and fglMap2; to enable
and disable it, call fglEnable and fglDisable.
When one of the fglEvalCoord commands is issued, all currently enabled
maps of the indicated dimension are evaluated. Then, for each enabled
map, it is as if the corresponding GL command had been issued with the
computed value. That is, if GL_MAP1_INDEX or GL_MAP2_INDEX is enabled, a
fglIndex command is simulated. If GL_MAP1_COLOR_4 or GL_MAP2_COLOR_4 is
enabled, a fglColor command 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, then an
Page 1
fglEvalCoord(3G) OpenGL Reference fglEvalCoord(3G)
appropriate fglTexCoord command is simulated.
For color, color index, normal, and texture coordinates the GL uses
evaluated values instead of current values for those evaluations that are
enabled, and current values otherwise, However, the evaluated values do
not update the current values. Thus, if fglVertex commands are
interspersed with fglEvalCoord commands, the color, normal, and texture
coordinates associated with the fglVertex commands are not affected by
the values generated by the fglEvalCoord commands, but only by the most
recent fglColor, fglIndex, fglNormal, and fglTexCoord commands.
No commands 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), then 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- nor a four-
component vertex map is enabled for the specified dimension, the
fglEvalCoord command is ignored.
If you have enabled automatic normal generation, by calling fglEnable
with argument GL_AUTO_NORMAL, fglEvalCoord2 generates surface normals
analytically, regardless of the contents or enabling of the
GL_MAP2_NORMAL map. Let
__ __
m = x
]u ]v
Then the generated normal n is
_____
n =
||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 fglEvalCoord2 commands.
ASSOCIATED GETS
fglIsEnabled with argument GL_MAP1_VERTEX_3
fglIsEnabled with argument GL_MAP1_VERTEX_4
fglIsEnabled with argument GL_MAP1_INDEX
fglIsEnabled with argument GL_MAP1_COLOR_4
fglIsEnabled with argument GL_MAP1_NORMAL
fglIsEnabled with argument GL_MAP1_TEXTURE_COORD_1
fglIsEnabled with argument GL_MAP1_TEXTURE_COORD_2
fglIsEnabled with argument GL_MAP1_TEXTURE_COORD_3
fglIsEnabled with argument GL_MAP1_TEXTURE_COORD_4
fglIsEnabled with argument GL_MAP2_VERTEX_3
fglIsEnabled with argument GL_MAP2_VERTEX_4
fglIsEnabled with argument GL_MAP2_INDEX
fglIsEnabled with argument GL_MAP2_COLOR_4
fglIsEnabled with argument GL_MAP2_NORMAL
fglIsEnabled with argument GL_MAP2_TEXTURE_COORD_1
Page 2
fglEvalCoord(3G) OpenGL Reference fglEvalCoord(3G)
fglIsEnabled with argument GL_MAP2_TEXTURE_COORD_2
fglIsEnabled with argument GL_MAP2_TEXTURE_COORD_3
fglIsEnabled with argument GL_MAP2_TEXTURE_COORD_4
fglIsEnabled with argument GL_AUTO_NORMAL
fglGetMap
MACHINE DEPENDENCIES
RealityEngine, RealityEngine2, and VTX systems do not handle 1D maps for
colors correctly.
SEE ALSO
fglBegin, fglColor, fglEnable, fglEvalMesh, fglEvalPoint, fglIndex,
fglMap1, fglMap2, fglMapGrid, fglNormal, fglTexCoord, fglVertex
Page 3