Gl.EvalCoord2f (gb.opengl)

Static Sub EvalCoord2f ( U As Float, V As Float )

Evaluate enabled one- and two-dimensional maps.

Parameters

u

Specifies a value that is the domain coordinate u to the basis function defined in a previous Gl.Map1 or Gl.Map2 command.
v

Specifies a value that is the domain coordinate v to the basis function defined in a previous Gl.Map2 command. This argument is not present in a Gl.EvalCoord1 command.

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 Gl.EvalCoord2 versions.

Description

Gl.EvalCoord1 evaluates enabled one-dimensional maps at argument u. Gl.EvalCoord2 does the same for two-dimensional maps using two domain values, u and v. To define a map, call Gl.Map1 and Gl.Map2; to enable and disable it, call Gl.Enable and Gl.Disable.

When one of the Gl.EvalCoord 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 Gl.Index command is simulated. If Gl.MAP1_COLOR_4 or Gl.MAP2_COLOR_4 is enabled, a Gl.Color 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 appropriate Gl.TexCoord 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 Gl.Vertex commands are interspersed with Gl.EvalCoord commands, the color, normal, and texture coordinates associated with the Gl.Vertex commands are not affected by the values generated by the Gl.EvalCoord commands, but only by the most recent Gl.Color, Gl.Index, Gl.Normal, and Gl.TexCoord 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 Gl.EvalCoord command is ignored.

If you have enabled automatic normal generation, by calling Gl.Enable with argument Gl.AUTO_NORMAL, Gl.EvalCoord2 generates surface normals analytically, regardless of the contents or enabling of the Gl.MAP2_NORMAL map. Let

m p u × p 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 Gl.EvalCoord2 commands.

Associated Gets

Gl.IsEnabled with argument Gl.MAP1_VERTEX_3

Gl.IsEnabled with argument Gl.MAP1_VERTEX_4

Gl.IsEnabled with argument Gl.MAP1_INDEX

Gl.IsEnabled with argument Gl.MAP1_COLOR_4

Gl.IsEnabled with argument Gl.MAP1_NORMAL

Gl.IsEnabled with argument Gl.MAP1_TEXTURE_COORD_1

Gl.IsEnabled with argument Gl.MAP1_TEXTURE_COORD_2

Gl.IsEnabled with argument Gl.MAP1_TEXTURE_COORD_3

Gl.IsEnabled with argument Gl.MAP1_TEXTURE_COORD_4

Gl.IsEnabled with argument Gl.MAP2_VERTEX_3

Gl.IsEnabled with argument Gl.MAP2_VERTEX_4

Gl.IsEnabled with argument Gl.MAP2_INDEX

Gl.IsEnabled with argument Gl.MAP2_COLOR_4

Gl.IsEnabled with argument Gl.MAP2_NORMAL

Gl.IsEnabled with argument Gl.MAP2_TEXTURE_COORD_1

Gl.IsEnabled with argument Gl.MAP2_TEXTURE_COORD_2

Gl.IsEnabled with argument Gl.MAP2_TEXTURE_COORD_3

Gl.IsEnabled with argument Gl.MAP2_TEXTURE_COORD_4

Gl.IsEnabled with argument Gl.AUTO_NORMAL

Gl.GetMap

See also

Gl.Begin, Gl.Enable, Gl.EvalMesh, Gl.EvalPoint, Gl.Index, Gl.Map1, Gl.Map2, Gl.MapGrid, Gl.Normal, Gl.TexCoord, Gl.Vertex

See original documentation on OpenGL website