table of contents
GLGETTEXPARAMETER(3G) | [FIXME: manual] | GLGETTEXPARAMETER(3G) |
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
texture
pname
params
DESCRIPTION¶
glGetTexParameter and glGetTextureParameter return in params the value or values of the texture parameter specified as 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. pname accepts the same symbols as glTexParameter(), with the same interpretations:
GL_DEPTH_STENCIL_TEXTURE_MODE
GL_TEXTURE_MAG_FILTER
GL_TEXTURE_MIN_FILTER
GL_TEXTURE_MIN_LOD
GL_TEXTURE_MAX_LOD
GL_TEXTURE_BASE_LEVEL
GL_TEXTURE_MAX_LEVEL
GL_TEXTURE_SWIZZLE_R
GL_TEXTURE_SWIZZLE_G
GL_TEXTURE_SWIZZLE_B
GL_TEXTURE_SWIZZLE_A
GL_TEXTURE_SWIZZLE_RGBA
GL_TEXTURE_WRAP_S
GL_TEXTURE_WRAP_T
GL_TEXTURE_WRAP_R
GL_TEXTURE_BORDER_COLOR
GL_TEXTURE_COMPARE_MODE
GL_TEXTURE_COMPARE_FUNC
GL_TEXTURE_VIEW_MIN_LEVEL
GL_TEXTURE_VIEW_NUM_LEVELS
GL_TEXTURE_VIEW_MIN_LAYER
GL_TEXTURE_VIEW_NUM_LAYERS
GL_TEXTURE_IMMUTABLE_LEVELS
In addition to the parameters that may be set with glTexParameter(), glGetTexParameter and glGetTextureParameter accept the following read-only parameters:
GL_IMAGE_FORMAT_COMPATIBILITY_TYPE
GL_TEXTURE_IMMUTABLE_FORMAT
GL_TEXTURE_TARGET
NOTES¶
If an error is generated, no change is made to the contents of params.
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 are available only if the GL version is 4.5 or greater.
ERRORS¶
GL_INVALID_ENUM is generated if pname is not an accepted value.
GL_INVALID_ENUM error is generated by glGetTexParameter if the effective target is not one of the accepted texture targets.
GL_INVALID_OPERATION is generated by glGetTextureParameter* if texture is not the name of an existing texture object.
VERSION SUPPORT¶
OpenGL Version | ||||||||||||
Function / Feature Name | 2.0 | 2.1 | 3.0 | 3.1 | 3.2 | 3.3 | 4.0 | 4.1 | 4.2 | 4.3 | 4.4 | 4.5 |
glGetTexParameterIiv | - | - | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ |
glGetTexParameterIuiv | - | - | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ |
glGetTexParameterfv | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ |
glGetTexParameteriv | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ |
glGetTextureParameterIiv | - | - | - | - | - | - | - | - | - | - | - | ✔ |
glGetTextureParameterIuiv | - | - | - | - | - | - | - | - | - | - | - | ✔ |
glGetTextureParameterfv | - | - | - | - | - | - | - | - | - | - | - | ✔ |
glGetTextureParameteriv | - | - | - | - | - | - | - | - | - | - | - | ✔ |
SEE ALSO¶
glTexParameter(),
glTextureParameter, glTexStorage1D(), glTexStorage2D(), glTexStorage3D(),
glTextureStorage1D,
glTextureStorage2D,
glTextureStorage3D, glTextureView()
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¶
Copyright © 1991-2006 Silicon Graphics, Inc.
Copyright © 2010-2014 Khronos Group
04/12/2021 | [FIXME: source] |