GLGETTEXPARAMETER(3G)
π GLGETTEXPARAMETER(3G) β return texture parameter values β¨
okay bestie, welcome to the GLGETTEXPARAMETER(3G) page from the [FIXME: manual] set. This is part 1 of 2, and it's giving "texture parameter values, but make it a reference page." No cap, we're keeping every detail. π«Ά
πΈ NAME πΈ
glGetTexParameter β return texture parameter values
π§Ύ C SPECIFICATION π§Ύ
void glGetTexParameterfv(GLenum target, GLenum pname, GLfloat * params);
void glGetTexParameteriv(GLenum target, GLenum pname, GLint * params);
void glGetTexParameterIiv(GLenum target, GLenum pname, GLint * params);
void glGetTexParameterIuiv(GLenum target, GLenum pname,
GLuint * params);
void glGetTextureParameterfv(GLuint texture, GLenum pname,
GLfloat *params);
void glGetTextureParameteriv(GLuint texture, GLenum pname,
GLint *params);
void glGetTextureParameterIiv(GLuint texture, GLenum pname,
GLint *params);
void glGetTextureParameterIuiv(GLuint texture, GLenum pname,
GLuint *params);
π PARAMETERS π
targetβ tells you which texture target the texture is bound to forglGetTexParameterfv,glGetTexParameteriv,glGetTexParameterIiv, andglGetTexParameterIuiv. The accepted targets areGL_TEXTURE_1D,GL_TEXTURE_1D_ARRAY,GL_TEXTURE_2D,GL_TEXTURE_2D_ARRAY,GL_TEXTURE_2D_MULTISAMPLE,GL_TEXTURE_2D_MULTISAMPLE_ARRAY,GL_TEXTURE_3D,GL_TEXTURE_CUBE_MAP,GL_TEXTURE_RECTANGLE, andGL_TEXTURE_CUBE_MAP_ARRAY.textureβ the texture object name forglGetTextureParameterfv,glGetTextureParameteriv,glGetTextureParameterIiv, andglGetTextureParameterIuiv. It's literally the texture's name, bestie. πͺͺpnameβ the symbolic name of the texture parameter you're asking about. Accepted values areGL_DEPTH_STENCIL_TEXTURE_MODE,GL_IMAGE_FORMAT_COMPATIBILITY_TYPE,GL_TEXTURE_BASE_LEVEL,GL_TEXTURE_BORDER_COLOR,GL_TEXTURE_COMPARE_MODE,GL_TEXTURE_COMPARE_FUNC,GL_TEXTURE_IMMUTABLE_FORMAT,GL_TEXTURE_IMMUTABLE_LEVELS,GL_TEXTURE_LOD_BIAS,GL_TEXTURE_MAG_FILTER,GL_TEXTURE_MAX_LEVEL,GL_TEXTURE_MAX_LOD,GL_TEXTURE_MIN_FILTER,GL_TEXTURE_MIN_LOD,GL_TEXTURE_SWIZZLE_R,GL_TEXTURE_SWIZZLE_G,GL_TEXTURE_SWIZZLE_B,GL_TEXTURE_SWIZZLE_A,GL_TEXTURE_SWIZZLE_RGBA,GL_TEXTURE_TARGET,GL_TEXTURE_VIEW_MIN_LAYER,GL_TEXTURE_VIEW_MIN_LEVEL,GL_TEXTURE_VIEW_NUM_LAYERS,GL_TEXTURE_VIEW_NUM_LEVELS,GL_TEXTURE_WRAP_S,GL_TEXTURE_WRAP_T, andGL_TEXTURE_WRAP_R.paramsβ where the texture parameter value(s) come back to you. It's the output slot. π₯
π DESCRIPTION π
glGetTexParameter and glGetTextureParameter return, in params, the value or values of the texture parameter you asked for with pname. target defines the target texture. GL_TEXTURE_1D, GL_TEXTURE_2D, GL_TEXTURE_3D, GL_TEXTURE_1D_ARRAY, GL_TEXTURE_2D_ARRAY, GL_TEXTURE_RECTANGLE, GL_TEXTURE_CUBE_MAP, GL_TEXTURE_CUBE_MAP_ARRAY, GL_TEXTURE_2D_MULTISAMPLE, or GL_TEXTURE_2D_MULTISAMPLE_ARRAY specify one-, two-, or three-dimensional, one-dimensional array, two-dimensional array, rectangle, cube-mapped or cube-mapped array, two-dimensional multisample, or two-dimensional multisample array texturing, respectively. Yes, that sentence is a lot. We survived. π
pname accepts the same symbols as glTexParameter(), with the same interpretations:
GL_DEPTH_STENCIL_TEXTURE_MODEβ returns the single-value depth stencil texture mode, a symbolic constant. The initial value isGL_DEPTH_COMPONENT.GL_TEXTURE_MAG_FILTERβ returns the single-valued texture magnification filter, a symbolic constant. The initial value isGL_LINEAR.GL_TEXTURE_MIN_FILTERβ returns the single-valued texture minification filter, a symbolic constant. The initial value isGL_NEAREST_MIPMAP_LINEAR.GL_TEXTURE_MIN_LODβ returns the single-valued texture minimum level-of-detail value. The initial value is-1000.GL_TEXTURE_MAX_LODβ returns the single-valued texture maximum level-of-detail value. The initial value is1000.GL_TEXTURE_BASE_LEVELβ returns the single-valued base texture mipmap level. The initial value is0.GL_TEXTURE_MAX_LEVELβ returns the single-valued maximum texture mipmap array level. The initial value is1000.GL_TEXTURE_SWIZZLE_Rβ returns the red component swizzle. The initial value isGL_RED.GL_TEXTURE_SWIZZLE_Gβ returns the green component swizzle. The initial value isGL_GREEN.GL_TEXTURE_SWIZZLE_Bβ returns the blue component swizzle. The initial value isGL_BLUE.GL_TEXTURE_SWIZZLE_Aβ returns the alpha component swizzle. The initial value isGL_ALPHA.GL_TEXTURE_SWIZZLE_RGBAβ returns the component swizzle for all channels in a single query. One query, all the swizzle tea. π΅GL_TEXTURE_WRAP_Sβ returns the single-valued wrapping function for texture coordinates, a symbolic constant. The initial value isGL_REPEAT.GL_TEXTURE_WRAP_Tβ returns the single-valued wrapping function for texture coordinatet, a symbolic constant. The initial value isGL_REPEAT.GL_TEXTURE_WRAP_Rβ returns the single-valued wrapping function for texture coordinater, a symbolic constant. The initial value isGL_REPEAT.GL_TEXTURE_BORDER_COLORβ returns four integer or floating-point numbers that comprise the RGBA color of the texture border. Floating-point values are returned in the range0to1. Integer values are returned as a linear mapping of the internal floating-point representation such that1.0maps to the most positive representable integer and-1.0maps to the most negative representable integer. The initial value is(0, 0, 0, 0).GL_TEXTURE_COMPARE_MODEβ returns a single-valued texture comparison mode, a symbolic constant. The initial value isGL_NONE. SeeglTexParameter().GL_TEXTURE_COMPARE_FUNCβ returns a single-valued texture comparison function, a symbolic constant. The initial value isGL_LEQUAL. SeeglTexParameter().GL_TEXTURE_VIEW_MIN_LEVELβ returns a single-valued base level of a texture view relative to its parent. The initial value is0. SeeglTextureView().GL_TEXTURE_VIEW_NUM_LEVELSβ returns a single-valued number of levels of detail of a texture view. SeeglTextureView().GL_TEXTURE_VIEW_MIN_LAYERβ returns a single-valued first level of a texture array view relative to its parent. SeeglTextureView().GL_TEXTURE_VIEW_NUM_LAYERSβ returns a single-valued number of layers in a texture array view. SeeglTextureView().GL_TEXTURE_IMMUTABLE_LEVELSβ returns a single-valued number of immutable texture levels in a texture view. SeeglTextureView().
In addition to the parameters that may be set with glTexParameter(), glGetTexParameter and glGetTextureParameter accept these read-only parameters:
GL_IMAGE_FORMAT_COMPATIBILITY_TYPEβ returns the matching criteria use for the texture when used as an image texture. It can returnGL_IMAGE_FORMAT_COMPATIBILITY_BY_SIZE,GL_IMAGE_FORMAT_COMPATIBILITY_BY_CLASSorGL_NONE.GL_TEXTURE_IMMUTABLE_FORMATβ returns non-zero if the texture has an immutable format. Textures become immutable if their storage is specified withglTexStorage1D(),glTexStorage2D()orglTexStorage3D(). The initial value isGL_FALSE.GL_TEXTURE_TARGETβ returns the effective target of the texture object. ForglGetTex*Parameterfunctions, this is thetargetparameter. ForglGetTextureParameter*, it is the target to which the texture was initially bound when it was created, or the value of thetargetparameter to the call toglCreateTextureswhich created the texture.
π«Ά NOTES π«Ά
If an error is generated, no change is made to the contents of params. So your output slot stays exactly as it was. π
GL_IMAGE_FORMAT_COMPATIBILITY_TYPE is available only if the GL version is 4.2 or greater.
GL_DEPTH_STENCIL_TEXTURE_MODE, GL_TEXTURE_VIEW_MIN_LEVEL, GL_TEXTURE_VIEW_NUM_LEVELS, GL_TEXTURE_VIEW_MIN_LAYER, GL_TEXTURE_VIEW_NUM_LAYERS and GL_TEXTURE_IMMUTABLE_LEVELS are available only if the GL version is 4.3 or greater.
GL_TEXTURE_TARGET is available only if the GL version is 4.5 or greater.
π ERRORS π
GL_INVALID_ENUMis generated ifpnameis not an accepted value.GL_INVALID_ENUMerror is generated byglGetTexParameterif the effective target is not one of the accepted texture targets.GL_INVALID_OPERATIONis generated byglGetTextureParameter*iftextureis not the name of an existing texture object.
β¨ VERSION SUPPORT β¨
Okay bestie, this is the vibe check table β which functions slay on which OpenGL version. The columns are the OpenGL Version, going 2.0, 2.1, 3.0, 3.1, 3.2, 3.3, 4.0, 4.1, 4.2, 4.3, 4.4, 4.5, and the rows are the Function / Feature Name. A β means supported, a - means nope, not invited. π
glGetTexParameterIivβ2.0:-,2.1:-,3.0:β,3.1:β,3.2:β,3.3:β,4.0:β,4.1:β,4.2:β,4.3:β,4.4:β,4.5:βglGetTexParameterIuivβ2.0:-,2.1:-,3.0:β,3.1:β,3.2:β,3.3:β,4.0:β,4.1:β,4.2:β,4.3:β,4.4:β,4.5:βglGetTexParameterfvβ2.0:β,2.1:β,3.0:β,3.1:β,3.2:β,3.3:β,4.0:β,4.1:β,4.2:β,4.3:β,4.4:β,4.5:βglGetTexParameterivβ2.0:β,2.1:β,3.0:β,3.1:β,3.2:β,3.3:β,4.0:β,4.1:β,4.2:β,4.3:β,4.4:β,4.5:βglGetTextureParameterIivβ2.0:-,2.1:-,3.0:-,3.1:-,3.2:-,3.3:-,4.0:-,4.1:-,4.2:-,4.3:-,4.4:-,4.5:βglGetTextureParameterIuivβ2.0:-,2.1:-,3.0:-,3.1:-,3.2:-,3.3:-,4.0:-,4.1:-,4.2:-,4.3:-,4.4:-,4.5:βglGetTextureParameterfvβ2.0:-,2.1:-,3.0:-,3.1:-,3.2:-,3.3:-,4.0:-,4.1:-,4.2:-,4.3:-,4.4:-,4.5:βglGetTextureParameterivβ2.0:-,2.1:-,3.0:-,3.1:-,3.2:-,3.3:-,4.0:-,4.1:-,4.2:-,4.3:-,4.4:-,4.5:β
So like, the glGetTexParameter* girlies have been around since 2.0 (except the integer Iiv/Iuiv variants who showed up in 3.0, late bloomers but we love them), and the glGetTextureParameter* squad is only a 4.5 thing. Main character energy, honestly. π₯
πΈ SEE ALSO πΈ
Go read these next, bestie, they're the whole friend group:
glTexParameter()glTextureParameter,glTexStorage1D(),glTexStorage2D(),glTexStorage3D()glTextureStorage1DglTextureStorage2DglTextureStorage3D,glTextureView()
No cap, that's the exact list. Every single one. Go click through them like a group chat rabbit hole. π«Ά
π COPYRIGHT π
Copyright Β© 1991-2006 Silicon Graphics, Inc. Copyright Β© 2010-2014 Khronos Group. This document is licensed under the SGI Free Software B License. For details, see http://oss.sgi.com/projects/FreeB/.
π COPYRIGHT (again, yes really) π
Not me listing it twice β the original does, so we do too. Periodt.
- Copyright Β© 1991-2006 Silicon Graphics, Inc.
- Copyright Β© 2010-2014 Khronos Group
And that's the whole page, bestie! π¦ The source is literally <yellow>[FIXME: source]</yellow>, the date is <mint>08/09/2021</mint>, and the manpage tag is <purple>GLGETTEXPARAMETER(3G)</purple>. Iconic. Ate. No crumbs. π
β¨π
π¦ where this page comes from
- centos-stream 9: gl-manpages 1.1-24.20190306.el9 Β· MIT and Open Publication
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms