|
NAMEglTexEnvf, glTexEnvi, glTexEnvfv, glTexEnviv - set texture environment parametersC SPECIFICATIONvoid glTexEnvf( GLenum target,GLenum pname, GLfloat param )void glTexEnvi( GLenum target, GLenum pname, GLint param ) PARAMETERS
C SPECIFICATIONvoid glTexEnvfv( GLenum target,GLenum pname, const GLfloat *params )void glTexEnviv( GLenum target, GLenum pname, const GLint *params ) PARAMETERS
DESCRIPTIONA texture environment specifies how texture values are interpreted when a fragment is textured. target must be GL_TEXTURE_ENV. pname can be either GL_TEXTURE_ENV_MODE or GL_TEXTURE_ENV_COLOR.If pname is GL_TEXTURE_ENV_MODE, then params is (or points to) the symbolic name of a texture function. Four texture functions may be specified: GL_MODULATE, GL_DECAL, GL_BLEND, and GL_REPLACE. A texture function acts on the fragment to be textured using the texture image value that applies to the fragment (see glTexParameter) and produces an RGBA color for that fragment. The following table shows how the RGBA color is produced for each of the three texture functions that can be chosen. is a triple of color values (RGB) and is the associated alpha value. RGBA values extracted from a texture image are in the range [0,1]. The subscript refers to the incoming fragment, the subscript to the texture image, the subscript to the texture environment color, and subscript indicates a value produced by the texture function. A texture image can have up to four components per texture element (see glTexImage1D, glTexImage2D, glCopyTexImage1D, and glCopyTexImage2D). In a one-component image, indicates that single component. A two-component image uses and . A three-component image has only a color value, . A four-component image has both a color value and an alpha value .
If pname is GL_TEXTURE_ENV_COLOR, params is a pointer to an array that holds an RGBA color consisting of four values. Integer color components are interpreted linearly such that the most positive integer maps to 1.0, and the most negative integer maps to -1.0. The values are clamped to the range [0,1] when they are specified. takes these four values. GL_TEXTURE_ENV_MODE defaults to GL_MODULATE and GL_TEXTURE_ENV_COLOR defaults to (0, 0, 0, 0). NOTESGL_REPLACE may only be used if the GL version is 1.1 or greater.Internal formats other than 1, 2, 3, or 4 may only be used if the GL version is 1.1 or greater. ERRORSGL_INVALID_ENUM is generated when target or pname is not one of the accepted defined values, or when params should have a defined constant value (based on the value of pname) and does not.GL_INVALID_OPERATION is generated if glTexEnv is executed between the execution of glBegin and the corresponding execution of glEnd. ASSOCIATED GETSglGetTexEnvSEE ALSOglCopyPixels, glCopyTexImage1D, glCopyTexImage2D, glCopyTexSubImage1D, glCopyTexSubImage2D, glTexImage1D, glTexImage2D, glTexParameter, glTexSubImage1D, glTexSubImage2D Visit the GSP FreeBSD Man Page Interface. |