glGetTexLevelParameterfv,
glGetTexLevelParameteriv
[New
- Windows 95, OEM Service Release 2]
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 |
|
); |
|
Parameters
target
The symbolic
name of the target texture: either GL_TEXTURE_1D or GL_TEXTURE_2D.
level
The
level-of-detail number of the desired image. Level 0 is the base image level.
Level n is the nth mipmap reduction image.
pname
The symbolic
name of a texture parameter. The following parameter names are accepted:
GL_TEXTURE_WIDTH
The params
parameter returns a single value: the width of the texture image. This value
includes the border of the texture image.
GL_TEXTURE_HEIGHT
The params
parameter returns a single value: the height of the texture image. This value
includes the border of the texture image.
GL_TEXTURE_COMPONENTS
The params
parameter returns a single value: the number of components in the texture
image.
GL_TEXTURE_BORDER
The params
parameter returns a single value: the width in pixels of the border of the
texture image.
params
Returns the
requested data.
Remarks
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.
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_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. |
See Also