GLGETTEXLEVELPARAMETER(3G)
π NAME π
okay so this is the GLGETTEXLEVELPARAMETER(3G) page, and it's here to spill the tea on glGetTexLevelParameterfv and glGetTexLevelParameteriv β the little functions that return texture parameter values for a specific level of detail π
β¨
π§Ύ C SPECIFICATION π§Ύ
bestie, here are the signatures, copy-paste energy only, no edits:
void glGetTexLevelParameterfv( GLenum target,
GLint level,
GLenum pname,
GLfloat *params )
void glGetTexLevelParameteriv( GLenum target,
GLint level,
GLenum pname,
GLint *params )
π PARAMETERS π
targetβ Specifies the symbolic name of the target texture, eitherGL_TEXTURE_1D,GL_TEXTURE_2D,GL_TEXTURE_3D,GL_PROXY_TEXTURE_1D,GL_PROXY_TEXTURE_2D, orGL_PROXY_TEXTURE_3D.levelβ Specifies the level-of-detail number of the desired image. Level0is the base image level. Levelnis the nth mipmap reduction image.pnameβ Specifies the symbolic name of a texture parameter.GL_TEXTURE_WIDTH,GL_TEXTURE_HEIGHT,GL_TEXTURE_DEPTH,GL_TEXTURE_INTERNAL_FORMAT,GL_TEXTURE_BORDER,GL_TEXTURE_RED_SIZE,GL_TEXTURE_GREEN_SIZE,GL_TEXTURE_BLUE_SIZE,GL_TEXTURE_ALPHA_SIZE,GL_TEXTURE_LUMINANCE_SIZE, andGL_TEXTURE_INTENSITY_SIZEare accepted.paramsβ Returns the requested data.
β¨ DESCRIPTION β¨
okay so glGetTexLevelParameter returns in params texture parameter values for a specific level-of-detail value, specified as level. And target defines the target texture, either GL_TEXTURE_1D, GL_TEXTURE_2D, GL_TEXTURE_3D, GL_PROXY_TEXTURE_1D, GL_PROXY_TEXTURE_2D, or GL_PROXY_TEXTURE_3D.
GL_MAX_TEXTURE_SIZE, and GL_MAX_3D_TEXTURE_SIZE are not really descriptive enough, fr fr. 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 glGetTexLevelParameter, 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βparamsreturns a single value, the width of the texture image. This value includes the border of the texture image. The initial value is0.GL_TEXTURE_HEIGHTβparamsreturns a single value, the height of the texture image. This value includes the border of the texture image. The initial value is0.GL_TEXTURE_DEPTHβparamsreturns a single value, the depth of the texture image. This value includes the border of the texture image. The initial value is0.GL_TEXTURE_INTERNAL_FORMATβparamsreturns a single value, the internal of the texture image. yes, the original leaves a lil blank spot there, and I'm not filling it in for you πGL_TEXTURE_BORDERβparamsreturns a single value, the width in pixels of the border of the texture image. The initial value is0.GL_TEXTURE_RED_SIZE,GL_TEXTURE_GREEN_SIZE,GL_TEXTURE_BLUE_SIZE,GL_TEXTURE_ALPHA_SIZE,GL_TEXTURE_LUMINANCE_SIZE, andGL_TEXTURE_INTENSITY_SIZEβ the internal storage resolution of an individual component. The resolution chosen by the GL will be a close match for the resolution requested by the user with thecomponentargument ofglTexImage1D,glTexImage2D,glTexImage3D,glCopyTexImage1D, andglCopyTexImage2D. The initial value is0.
π NOTES π
If an error is generated, no change is made to the contents of params.
GL_TEXTURE_INTERNAL_FORMAT is available only if the GL version is 1.1 or greater. In version 1.0, use GL_TEXTURE_COMPONENTS instead.
GL_PROXY_TEXTURE_1D and GL_PROXY_TEXTURE_2D are available only if the GL version is 1.1 or greater.
GL_TEXTURE_3D, GL_PROXY_TEXTURE_3D, and GL_TEXTURE_DEPTH are available only if the GL version is 1.2 or greater.
When the GL_ARB_multitexture extension is supported, glGetTexLevelParameter returns the texture level parameters for the active texture unit.
π ERRORS π
GL_INVALID_ENUMis generated iftargetorpnameis not an accepted value.GL_INVALID_VALUEis generated iflevelis less than0.GL_INVALID_VALUEmay be generated iflevelis greater thanlog2 max, wheremaxis the returned value ofGL_MAX_TEXTURE_SIZE.GL_INVALID_OPERATIONis generated ifglGetTexLevelParameteris executed between the execution ofglBeginand the corresponding execution ofglEnd.
π SEE ALSO π
glActiveTextureARB(3G), glGetTexParameter(3G), glCopyTexImage1D(3G), glCopyTexImage2D(3G), glCopyTexSubImage1D(3G), glCopyTexSubImage2D(3G), glCopyTexSubImage3D(3G), glTexEnv(3G), glTexGen(3G), glTexImage1D(3G), glTexImage2D(3G), glTexImage3D(3G), glTexSubImage1D(3G), glTexSubImage2D(3G), glTexSubImage3D(3G), glTexParameter(3G)
and that's the whole GLGETTEXLEVELPARAMETER(3G) moment, bestie π«Ά the original footer is just the same GLGETTEXLEVELPARAMETER(3G) tag with no separate source/version/date line, so no invented metadata here β sparkly sign-off complete, periodt πβ¨
π¦ where this page comes from
- opensuse-leap 16.0: Mesa-libGL-devel 24.1.7-160000.3.1 Β· MIT
- opensuse-leap 16.0: Mesa-libGL-devel 24.3.3-160000.3.1 Β· MIT
- opensuse-leap 16.0: Mesa-libGL-devel 24.3.3-160000.3.1 Β· MIT
- opensuse-leap 16.0: Mesa-libGL-devel 24.3.3-160000.3.1 Β· MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms