glGetTexEnvfv
The glGetTexEnvfv and glGetTexEnviv functions return texture environment parameters.
void glGetTexEnvfv(
GLenum target, GLenum pname, GLfloat *params);void glGetTexEnviv( GLenum target, GLenum pname, GLint *params);
Parameters
target
A texture environment. Must be GL_TEXTURE_ENV.pname
The symbolic name of a texture environment parameter. The following values are accepted:Value Meaning GL_TEXTURE_ENV_MODE The params parameter returns the single-valued texture environment mode, a symbolic constant. GL_TEXTURE_ENV_COLOR The params parameter returns four integer or floating-point values that are the texture environment color. Integer values, when requested, are linearly mapped from the internal floating-point representation such that 1.0 maps to the most positive representable integer, and 1.0 maps to the most negative representable integer. params
Returns the requested data.
Remarks
The glGetTexEnv function returns in params selected values of a texture environment that was specified with glTexEnv. The target parameter specifies a texture environment. Currently, only one texture environment is defined and supported: GL_TEXTURE_ENV.
The pname parameter names a specific texture environment parameter.
If an error is generated, no change is made to the contents of params.
Error Codes
The following are the error codes generated and their conditions.
Error code | Condition |
---|---|
GL_INVALID_ENUM | target or pname was not an accepted value. |
GL_INVALID_OPERATION | glGetTexEnv was called between a call to glBegin and the corresponding call to glEnd. |
Requirements
** Windows NT/2000:** Requires Windows NT 3.5 or later.
** Windows 95/98:** Requires Windows 95 or later. Available as a redistributable for Windows 95.
** Header:** Declared in Gl.h.
** Library:** Use Opengl32.lib.