param = gl.GetTexLevelParameter(target, level, pname)
gl.GetTexLevelParameter()
returns texture parameter values for a specific level-of-detail value,
specified as level
. target
defines the target texture, either #GL_TEXTURE_1D
, #GL_TEXTURE_2D
, #GL_PROXY_TEXTURE_1D
,
or #GL_PROXY_TEXTURE_2D
.
#GL_MAX_TEXTURE_SIZE
is not really descriptive enough. It has to report the largest square texture image
that can be accommodated with mipmaps and borders, but a long skinny texture, or a texture without mipmaps
and borders, may easily fit in texture memory. The proxy targets allow the user to more accurately query
whether the GL can accommodate a texture of a given configuration. If the texture cannot be accommodated,
the texture state variables, which may be queried with gl.GetTexLevelParameter()
, are set to 0. If the
texture can be accommodated, the texture state values will be set as they would be set for a non-proxy target.
pname
specifies the texture parameter whose value or values will be returned. The accepted parameter names are as follows:
#GL_TEXTURE_WIDTH
#GL_TEXTURE_HEIGHT
#GL_TEXTURE_DEPTH
#GL_TEXTURE_INTERNAL_FORMAT
#GL_TEXTURE_BORDER
#GL_TEXTURE_XXX_SIZE
Please consult an OpenGL reference manual for more information.
#GL_TEXTURE_1D
, #GL_TEXTURE_2D
, #GL_PROXY_TEXTURE_1D
, or #GL_PROXY_TEXTURE_2D
#GL_INVALID_ENUM
is generated if target
or pname
is not an accepted value.
#GL_INVALID_VALUE
is generated if level
is less than 0.
#GL_INVALID_VALUE
may be generated if level
is greater than ld(max), where max is the returned value of #GL_MAX_TEXTURE_SIZE
.
#GL_INVALID_OPERATION
is generated if gl.GetTexLevelParameter()
is executed between the execution of gl.Begin() and the corresponding execution of gl.End() .