glFogFuncEXT
NAME
glFogFuncEXT - custom fog blending function
C SPECIFICATION
void glFogFuncEXT(GLsizei n,
const GLfloat points)
PARAMETERS
n
| Specifies the number of control points in the custom fog blending
function. The initial value is 1.
|
points
| Specifies an array of control points. Each control point
consists of two floating-point values. The first is an eye-space
distance, and the second is a fog blending factor in the range
[0,1]. Blending factor 0.0 indicates full fog, and 1.0
indicates no fog. The initial value is (0.0,1.0) (no fog).
|
DESCRIPTION
glFogFuncEXT defines the control points for the custom fog blending
function that is applied when the fog mode is GL_FOG_FUNC_EXT. See
glFog for a discussion of the various fog
modes and the operation of the custom blending function.
n is the number of control points in the custom fog blending function
and must not be larger than the value returned by glGet
with argument GL_MAX_FOG_FUNC_POINTS_EXT. n must be at least 1.
points is an array of pairs of floating-point values that define the
control points. Each control point consists of an eye-space distance
from the viewpoint (always non-negative) and the corresponding fog
blending factor (in the range [0,1]). Blending factor 0.0 results in
full fog, and 1.0 results in no fog. The control points must be
specified in order -- eye space distance must not decrease from one control
point to the next, and the fog blending factor must not increase from one
control point to the next.
n and points completely specify the custom fog blending function,
replacing any previous specification that may have existed.
NOTES
Note that since each control point is a pair of values, there are
2 * n floating-point values in points.
EXTENSIONS
Some routines and constants for this function are part of an extension, not part of the
core GL command set. The following extension names must be present in the string returned by
glGetString when called with argument GL_EXTENSIONS
to use these routines and constants.
- GL_EXT_fog_function
-
glFogFuncEXT, GL_FOG_FUNC_EXT, and GL_MAX_FOG_FUNC_POINTS_EXT
are part of the EXT_fog_function extension.
ERRORS
GL_INVALID_VALUE is generated if n is less than 1.
GL_INVALID_VALUE is generated if any eye-space distance in the point
array is negative or if any blend factor in the point array is outside of
the range [0,1].
GL_INVALID_VALUE is generated if the eye-space distance decreases from
one control point to the next, or if the blending factor increases from
one control point to the next.
GL_INVALID_OPERATION is generated if glFogFuncEXT is executed between
the execution of glBegin and the corresponding
execution of glEnd.
ASSOCIATED GETS
glGet with argument GL_FOG_FUNC_EXT
glGet with argument GL_FOG_FUNC_POINTS_EXT
glGet with argument GL_MAX_FOG_FUNC_POINTS_EXT
SEE ALSO
glFog,
glGetString