The glGetTexLevelParameterfv and glGetTexLevelParameteriv functions return texture parameter values for a specific level of detail.
void glGetTexLevelParameterfv(
GLenum target,
GLint level,
GLenum pname,
GLfloat * params
);
void glGetTexLevelParameteriv(
GLenum target,
GLint level,
GLenum pname,
GLint * params
);
The glGetTexLevelParameter function returns in params texture parameter values for a specific level-of-detail value, specified as level. The target parameter defines the target texture—either GL_TEXTURE_1D or GL_TEXTURE_2D—to specify one- or two-dimensional texturing. The pname parameter specifies the texture parameter whose value or values will be returned.
If an error is generated, no change is made to the contents of params.
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_VALUE | level is less than zero or greater than log (2) max, where max is the returned value of GL_MAX_TEXTURE_SIZE. |
GL_INVALID_OPERATION | glGetTexLevelParameter was called between a call to glBegin and the corresponding call to glEnd. |
Windows NT: Use version 3.5 and later.
Windows: Use Windows 95 and later.
Windows CE: Unsupported.
Header: Declared in gl.h.
Import Library: Link with opengl32.lib.
glBegin, glEnd, glGetTexParameter, glTexImage1D, glTexImage2D, glTexParameter