GlGetTexParameter
_glGetTexParameter: return texture parameter values
Contents
Syntax
SUB _glGetTexParameterfv (BYVAL target AS _UNSIGNED LONG, BYVAL pname AS _UNSIGNED LONG, params AS SINGLE) void _glGetTexParameterfv(GLenum target, GLenum pname, GLfloat * params);
SUB _glGetTexParameteriv (BYVAL target AS _UNSIGNED LONG, BYVAL pname AS _UNSIGNED LONG, params AS LONG) void _glGetTexParameteriv(GLenum target, GLenum pname, GLint * params);
void _glGetTexParameterIiv(GLenum target, GLenum pname, GLint * params); void _glGetTexParameterIuiv(GLenum target, GLenum pname, GLuint * params);
- target
- Specifies the symbolic name of the target texture. _GL_TEXTURE_1D, _GL_TEXTURE_2D, _GL_TEXTURE_1D_ARRAY, _GL_TEXTURE_2D_ARRAY, _GL_TEXTURE_3D, _GL_TEXTURE_RECTANGLE, _GL_TEXTURE_CUBE_MAP, and _GL_TEXTURE_CUBE_MAP_ARRAY are accepted.
- pname
- Specifies the symbolic name of a texture parameter. _GL_DEPTH_STENCIL_TEXTURE_MODE, _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_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, and _GL_TEXTURE_WRAP_R are accepted.
- params
- Returns the texture parameters.
Description
_glGetTexParameter returns 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 specify one-, two-, or three-dimensional, one-dimensional array, two-dimensional array, rectangle, cube-mapped or cube-mapped array texturing, respectively. 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 is _GL_DEPTH_COMPONENT.
- _GL_TEXTURE_MAG_FILTER
- Returns the single-valued texture magnification filter, a symbolic constant. The initial value is _GL_LINEAR.
- _GL_TEXTURE_MIN_FILTER
- Returns the single-valued texture minification filter, a symbolic constant. The initial value is _GL_NEAREST_MIPMAP_LINEAR.
- _GL_TEXTURE_MIN_LOD
- _GL_TEXTURE_MAX_LOD
- Returns the single-valued texture maximum level-of-detail value. The initial value is 1000.
- _GL_TEXTURE_BASE_LEVEL
- Returns the single-valued base texture mipmap level. The initial value is 0.
- _GL_TEXTURE_MAX_LEVEL
- Returns the single-valued maximum texture mipmap array level. The initial value is 1000.
- _GL_TEXTURE_SWIZZLE_R
- Returns the red component swizzle. The initial value is _GL_RED.
- _GL_TEXTURE_SWIZZLE_G
- Returns the green component swizzle. The initial value is _GL_GREEN.
- _GL_TEXTURE_SWIZZLE_B
- Returns the blue component swizzle. The initial value is _GL_BLUE.
- _GL_TEXTURE_SWIZZLE_A
- Returns the alpha component swizzle. The initial value is _GL_ALPHA.
- _GL_TEXTURE_SWIZZLE_RGBA
- Returns the component swizzle for all channels in a single query.
- _GL_TEXTURE_WRAP_S
- Returns the single-valued wrapping function for texture coordinate s, a symbolic constant. The initial value is _GL_REPEAT.
- _GL_TEXTURE_WRAP_T
- Returns the single-valued wrapping function for texture coordinate t, a symbolic constant. The initial value is _GL_REPEAT.
- _GL_TEXTURE_WRAP_R
- Returns the single-valued wrapping function for texture coordinate r, a symbolic constant. The initial value is _GL_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 range [0, 1]. Integer values are returned as a linear mapping of the internal floating-point representation such that 1.0 maps to the most positive representable integer and -1.0 maps 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 is _GL_NONE. See _glTexParameter.
- _GL_TEXTURE_COMPARE_FUNC
- Returns a single-valued texture comparison function, a symbolic constant. The initial value is _GL_LEQUAL. See _glTexParameter.
- _GL_TEXTURE_VIEW_MIN_LEVEL
- Returns a single-valued base level of a texture view relative to its parent. The initial value is 0. See _glTextureView.
- _GL_TEXTURE_VIEW_NUM_LEVELS
- Returns a single-valued number of levels of detail of a texture view. See _glTextureView.
- _GL_TEXTURE_VIEW_MIN_LAYER
- Returns a single-valued first level of a texture array view relative to its parent. See _glTextureView.
- _GL_TEXTURE_VIEW_NUM_LAYERS
- Returns a single-valued number of layers in a texture array view. See _glTextureView.
- _GL_TEXTURE_IMMUTABLE_LEVELS
- Returns a single-valued number of immutable texture levels in a texture view. See _glTextureView.
In addition to the parameters that may be set with _glTexParameter, _glGetTexParameter accepts the following read-only parameters:
- _GL_TEXTURE_IMMUTABLE_FORMAT
- Returns non-zero if the texture has an immutable format. Textures become immutable if their storage is specified with _glTexStorage1D, _glTexStorage2D or _glTexStorage3D. The initial value is _GL_FALSE.
Notes:
If an error is generated, no change is made to the contents of params.
_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.
Errors
_GL_INVALID_ENUM is generated if target or pname is not an accepted value.
See also
SUB _GL _glActiveTexture, _glBindTexture, _glGetTexLevelParameter, _glTexParameter
Copyright 1991-2006 Silicon Graphics, Inc. Copyright 2010-2012 Khronos Group. This document is licensed under the SGI Free Software B License. For details, see http://oss.sgi.com/projects/FreeB/.