Difference between revisions of "GLAPI/glGetTexLevelParameter"

From OpenGL Wiki
Jump to: navigation, search
m (Bot: Adjusting API page category.)
m (Bot: Adding better formatting.)
 
(9 intermediate revisions by 2 users not shown)
Line 8: Line 8:
 
== Function Definition ==
 
== Function Definition ==
  
   void '''glGetTexLevelParameterfv'''(GLenum ''target'', GLint ''level'', GLenum ''pname'', GLfloat * ''params'');
+
   void '''glGetTexLevelParameterfv'''(GLenum {{param|target}}, GLint {{param|level}}, GLenum {{param|pname}}, GLfloat * {{param|params}});
   void '''glGetTexLevelParameteriv'''(GLenum ''target'', GLint ''level'', GLenum ''pname'', GLint * ''params'');
+
   void '''glGetTexLevelParameteriv'''(GLenum {{param|target}}, GLint {{param|level}}, GLenum {{param|pname}}, GLint * {{param|params}});
  
 
; target
 
; target
: Specifies the symbolic name of the target texture, one of {{code|GL_TEXTURE_1D}}, {{code|GL_TEXTURE_2D}}, {{code|GL_TEXTURE_3D}}, {{code|GL_TEXTURE_1D_ARRAY}}, {{code|GL_TEXTURE_2D_ARRAY}}, {{code|GL_TEXTURE_RECTANGLE}}, {{code|GL_TEXTURE_2D_MULTISAMPLE}}, {{code|GL_TEXTURE_2D_MULTISAMPLE_ARRAY}}, {{code|GL_TEXTURE_CUBE_MAP_POSITIVE_X}}, {{code|GL_TEXTURE_CUBE_MAP_NEGATIVE_X}}, {{code|GL_TEXTURE_CUBE_MAP_POSITIVE_Y}}, {{code|GL_TEXTURE_CUBE_MAP_NEGATIVE_Y}}, {{code|GL_TEXTURE_CUBE_MAP_POSITIVE_Z}}, {{code|GL_TEXTURE_CUBE_MAP_NEGATIVE_Z}}, {{code|GL_PROXY_TEXTURE_1D}}, {{code|GL_PROXY_TEXTURE_2D}}, {{code|GL_PROXY_TEXTURE_3D}}, {{code|GL_PROXY_TEXTURE_1D_ARRAY}}, {{code|GL_PROXY_TEXTURE_2D_ARRAY}}, {{code|GL_PROXY_TEXTURE_RECTANGLE}}, {{code|GL_PROXY_TEXTURE_2D_MULTISAMPLE}}, {{code|GL_PROXY_TEXTURE_2D_MULTISAMPLE_ARRAY}}, {{code|GL_PROXY_TEXTURE_CUBE_MAP}}, or {{code|GL_TEXTURE_BUFFER}}.
+
: Specifies the symbolic name of the target texture, one of {{enum|GL_TEXTURE_1D}}, {{enum|GL_TEXTURE_2D}}, {{enum|GL_TEXTURE_3D}}, {{enum|GL_TEXTURE_1D_ARRAY}}, {{enum|GL_TEXTURE_2D_ARRAY}}, {{enum|GL_TEXTURE_RECTANGLE}}, {{enum|GL_TEXTURE_2D_MULTISAMPLE}}, {{enum|GL_TEXTURE_2D_MULTISAMPLE_ARRAY}}, {{enum|GL_TEXTURE_CUBE_MAP_POSITIVE_X}}, {{enum|GL_TEXTURE_CUBE_MAP_NEGATIVE_X}}, {{enum|GL_TEXTURE_CUBE_MAP_POSITIVE_Y}}, {{enum|GL_TEXTURE_CUBE_MAP_NEGATIVE_Y}}, {{enum|GL_TEXTURE_CUBE_MAP_POSITIVE_Z}}, {{enum|GL_TEXTURE_CUBE_MAP_NEGATIVE_Z}}, {{enum|GL_PROXY_TEXTURE_1D}}, {{enum|GL_PROXY_TEXTURE_2D}}, {{enum|GL_PROXY_TEXTURE_3D}}, {{enum|GL_PROXY_TEXTURE_1D_ARRAY}}, {{enum|GL_PROXY_TEXTURE_2D_ARRAY}}, {{enum|GL_PROXY_TEXTURE_RECTANGLE}}, {{enum|GL_PROXY_TEXTURE_2D_MULTISAMPLE}}, {{enum|GL_PROXY_TEXTURE_2D_MULTISAMPLE_ARRAY}}, {{enum|GL_PROXY_TEXTURE_CUBE_MAP}}, or {{enum|GL_TEXTURE_BUFFER}}.
 
; level
 
; level
 
: Specifies the level-of-detail number of the desired image. Level 0 is the base image level. Level ''n'' is the ''n''th mipmap reduction image.
 
: Specifies the level-of-detail number of the desired image. Level 0 is the base image level. Level ''n'' is the ''n''th mipmap reduction image.
 
; pname
 
; pname
: Specifies the symbolic name of a texture parameter. {{code|GL_TEXTURE_WIDTH}}, {{code|GL_TEXTURE_HEIGHT}}, {{code|GL_TEXTURE_DEPTH}}, {{code|GL_TEXTURE_INTERNAL_FORMAT}}, {{code|GL_TEXTURE_BORDER}}, {{code|GL_TEXTURE_RED_SIZE}}, {{code|GL_TEXTURE_GREEN_SIZE}}, {{code|GL_TEXTURE_BLUE_SIZE}}, {{code|GL_TEXTURE_ALPHA_SIZE}}, {{code|GL_TEXTURE_DEPTH_SIZE}}, {{code|GL_TEXTURE_COMPRESSED}}, and {{code|GL_TEXTURE_COMPRESSED_IMAGE_SIZE}} are accepted.
+
: Specifies the symbolic name of a texture parameter.
 
; params
 
; params
 
: Returns the requested data.
 
: Returns the requested data.
Line 22: Line 22:
 
== Description ==
 
== Description ==
  
'''glGetTexLevelParameter''' returns in ''params'' texture parameter values for a specific level-of-detail value, specified as ''level''. ''target'' defines the target texture, either {{code|GL_TEXTURE_1D}}, {{code|GL_TEXTURE_2D}}, {{code|GL_TEXTURE_3D}}, {{code|GL_PROXY_TEXTURE_1D}}, {{code|GL_PROXY_TEXTURE_2D}}, {{code|GL_PROXY_TEXTURE_3D}}, {{code|GL_TEXTURE_CUBE_MAP_POSITIVE_X}}, {{code|GL_TEXTURE_CUBE_MAP_NEGATIVE_X}}, {{code|GL_TEXTURE_CUBE_MAP_POSITIVE_Y}}, {{code|GL_TEXTURE_CUBE_MAP_NEGATIVE_Y}}, {{code|GL_TEXTURE_CUBE_MAP_POSITIVE_Z}}, {{code|GL_TEXTURE_CUBE_MAP_NEGATIVE_Z}}, or {{code|GL_PROXY_TEXTURE_CUBE_MAP}}.
+
'''glGetTexLevelParameter''' returns in {{param|params}} texture parameter values for a specific level-of-detail value, specified as {{param|level}}. {{param|target}} defines the target texture, either {{enum|GL_TEXTURE_1D}}, {{enum|GL_TEXTURE_2D}}, {{enum|GL_TEXTURE_3D}}, {{enum|GL_PROXY_TEXTURE_1D}}, {{enum|GL_PROXY_TEXTURE_2D}}, {{enum|GL_PROXY_TEXTURE_3D}}, {{enum|GL_TEXTURE_CUBE_MAP_POSITIVE_X}}, {{enum|GL_TEXTURE_CUBE_MAP_NEGATIVE_X}}, {{enum|GL_TEXTURE_CUBE_MAP_POSITIVE_Y}}, {{enum|GL_TEXTURE_CUBE_MAP_NEGATIVE_Y}}, {{enum|GL_TEXTURE_CUBE_MAP_POSITIVE_Z}}, {{enum|GL_TEXTURE_CUBE_MAP_NEGATIVE_Z}}, or {{enum|GL_PROXY_TEXTURE_CUBE_MAP}}.
  
{{code|GL_MAX_TEXTURE_SIZE}}, and {{code|GL_MAX_3D_TEXTURE_SIZE}} are 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 '''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.
+
{{enum|GL_MAX_TEXTURE_SIZE}}, and {{enum|GL_MAX_3D_TEXTURE_SIZE}} are not really descriptive enough. It has to report the largest square texture image that can be accommodated with mipmaps but a long skinny texture, or a texture without mipmaps 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.
+
{{param|pname}} specifies the texture parameter whose value or values will be returned.
  
 
The accepted parameter names are as follows:
 
The accepted parameter names are as follows:
  
; {{code|GL_TEXTURE_WIDTH}}
+
; {{enum|GL_TEXTURE_WIDTH}}
:  
+
: {{param|params}} returns a single value, the width of the texture image. This value includes the border of the texture image. The initial value is 0.
''params'' returns a single value, the width of the texture image. This value includes the border of the texture image. The initial value is 0.
+
; {{enum|GL_TEXTURE_HEIGHT}}
; {{code|GL_TEXTURE_HEIGHT}}
+
: {{param|params}} returns a single value, the height of the texture image. This value includes the border of the texture image. The initial value is 0.
:  
+
; {{enum|GL_TEXTURE_DEPTH}}
''params'' returns a single value, the height of the texture image. This value includes the border of the texture image. The initial value is 0.
+
: {{param|params}} returns a single value, the depth of the texture image. This value includes the border of the texture image. The initial value is 0.
; {{code|GL_TEXTURE_DEPTH}}
+
; {{enum|GL_TEXTURE_SAMPLES}}
:  
+
: {{param|params}} returns a single value, the number of samples in a multisample image. For non-multisample textures, this is 0.
''params'' returns a single value, the depth of the texture image. This value includes the border of the texture image. The initial value is 0.
+
; {{enum|GL_TEXTURE_FIXED_SAMPLE_LOCATIONS}}
; {{code|GL_TEXTURE_INTERNAL_FORMAT}}
+
: {{param|params}} returns a boolean value. {{enum|GL_TRUE}} if the sample locations are fixed, and {{enum|GL_FALSE}} otherwise.
:  
+
; {{enum|GL_TEXTURE_INTERNAL_FORMAT}}
''params'' returns a single value, the internal format of the texture image.
+
: {{param|params}} returns a single value, the internal format of the texture image.
; {{code|GL_TEXTURE_RED_TYPE}},
+
; {{enum|GL_TEXTURE_RED_TYPE}}, {{enum|GL_TEXTURE_GREEN_TYPE}}, {{enum|GL_TEXTURE_BLUE_TYPE}}, {{enum|GL_TEXTURE_ALPHA_TYPE}}, {{enum|GL_TEXTURE_DEPTH_TYPE}}
: ; {{code|GL_TEXTURE_GREEN_TYPE}},
+
; {{enum|GL_TEXTURE_RED_SIZE}}, {{enum|GL_TEXTURE_GREEN_SIZE}}, {{enum|GL_TEXTURE_BLUE_SIZE}}, {{enum|GL_TEXTURE_ALPHA_SIZE}}, {{enum|GL_TEXTURE_DEPTH_SIZE}}, {{enum|GL_TEXTURE_STENCIL_SIZE}}
: ; {{code|GL_TEXTURE_BLUE_TYPE}},
+
: 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 the component argument of {{apifunc|glTexImage1D}}, {{apifunc|glTexImage2D}}, {{apifunc|glTexImage3D}}, {{apifunc|glCopyTexImage1D}}, and {{apifunc|glCopyTexImage2D}}. The initial value is 0.
: ; {{code|GL_TEXTURE_ALPHA_TYPE}},
+
; {{enum|GL_TEXTURE_SHARED_SIZE}}
: ; {{code|GL_TEXTURE_DEPTH_TYPE}}
+
: {{param|params}} will store a single value, the number of bits in the shared exponent of the [[Image Format]]. If the image format doesn't have a shared exponent, then it is 0.
:  
+
: The data type used to store the component. The types {{enum|GL_NONE}}, {{enum|GL_SIGNED_NORMALIZED}}, {{enum|GL_UNSIGNED_NORMALIZED}}, {{enum|GL_FLOAT}}, {{enum|GL_INT}}, and {{enum|GL_UNSIGNED_INT}} may be returned to indicate signed normalized fixed-point, unsigned normalized fixed-point, floating-point, integer unnormalized, and unsigned integer unnormalized components, respectively.
The data type used to store the component. The types {{code|GL_NONE}}, {{code|GL_SIGNED_NORMALIZED}}, {{code|GL_UNSIGNED_NORMALIZED}}, {{code|GL_FLOAT}}, {{code|GL_INT}}, and {{code|GL_UNSIGNED_INT}} may be returned to indicate signed normalized fixed-point, unsigned normalized fixed-point, floating-point, integer unnormalized, and unsigned integer unnormalized components, respectively.
+
; {{enum|GL_TEXTURE_COMPRESSED}}
; {{code|GL_TEXTURE_RED_SIZE}},
+
: {{param|params}} returns a single boolean value indicating if the texture image is stored in a compressed internal format. The initiali value is {{enum|GL_FALSE}}.
: ; {{code|GL_TEXTURE_GREEN_SIZE}},
+
; {{enum|GL_TEXTURE_COMPRESSED_IMAGE_SIZE}}
: ; {{code|GL_TEXTURE_BLUE_SIZE}},
+
: {{param|params}} returns a single integer value, the number of unsigned bytes of the compressed texture image that would be returned from {{apifunc|glGetCompressedTexImage}}.
: ; {{code|GL_TEXTURE_ALPHA_SIZE}},
+
; {{enum|GL_TEXTURE_BUFFER_DATA_STORE_BINDING}}
: ; {{code|GL_TEXTURE_DEPTH_SIZE}}
+
: For [[Buffer Texture]]s, the buffer object (if any) attached to this mipmap level. For non-buffer textures, this is 0.
:  
+
; {{enum|GL_TEXTURE_BUFFER_OFFSET}}
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 the component argument of [[GLAPI/glTexImage1D|glTexImage1D]], [[GLAPI/glTexImage2D|glTexImage2D]], [[GLAPI/glTexImage3D|glTexImage3D]], [[GLAPI/glCopyTexImage1D|glCopyTexImage1D]], and [[GLAPI/glCopyTexImage2D|glCopyTexImage2D]]. The initial value is 0.
+
: {{param|params}} returns a single integer value, the offset into the data store of the buffer bound to a buffer texture. {{apifunc|glTexBufferRange}}.
; {{code|GL_TEXTURE_COMPRESSED}}
+
; {{enum|GL_TEXTURE_BUFFER_SIZE}}
:  
+
: {{param|params}} returns a single integer value, the size of the range of a data store of the buffer bound to a buffer texture. {{apifunc|glTexBufferRange}}.
''params'' returns a single boolean value indicating if the texture image is stored in a compressed internal format. The initiali value is {{code|GL_FALSE}}.
+
 
; {{code|GL_TEXTURE_COMPRESSED_IMAGE_SIZE}}
 
:  
 
''params'' returns a single integer value, the number of unsigned bytes of the compressed texture image that would be returned from [[GLAPI/glGetCompressedTexImage|glGetCompressedTexImage]].
 
 
== Notes ==
 
== Notes ==
  
If an error is generated, no change is made to the contents of ''params''.
+
If an error is generated, no change is made to the contents of {{param|params}}.
  
 
'''glGetTexLevelParameter''' returns the texture level parameters for the active texture unit.
 
'''glGetTexLevelParameter''' returns the texture level parameters for the active texture unit.
 +
 +
{{enum|GL_TEXTURE_BUFFER_OFFSET}} and {{enum|GL_TEXTURE_BUFFER_SIZE}} are available only if the GL version is 4.3 or greater.
  
 
== Errors ==
 
== Errors ==
  
{{code|GL_INVALID_ENUM}} is generated if ''target'' or ''pname'' is not an accepted value.
+
{{enum|GL_INVALID_ENUM}} is generated if {{param|target}} or {{param|pname}} is not an accepted value.
  
{{code|GL_INVALID_VALUE}} is generated if ''level'' is less than 0.
+
{{enum|GL_INVALID_VALUE}} is generated if {{param|level}} is less than 0.
  
{{code|GL_INVALID_VALUE}} may be generated if ''level'' is greater than log<sub>2</sub>(''max''), where ''max'' is the returned value of {{code|GL_MAX_TEXTURE_SIZE}}.
+
{{enum|GL_INVALID_VALUE}} may be generated if {{param|level}} is greater than log<sub>2</sub>(''max''), where ''max'' is the returned value of {{enum|GL_MAX_TEXTURE_SIZE}}.
  
{{code|GL_INVALID_VALUE}} is generated if ''target'' is {{code|GL_TEXTURE_BUFFER}} and ''level'' is not zero.
+
{{enum|GL_INVALID_VALUE}} is generated if {{param|target}} is {{enum|GL_TEXTURE_BUFFER}} and {{param|level}} is not zero.
  
{{code|GL_INVALID_OPERATION}} is generated if {{code|GL_TEXTURE_COMPRESSED_IMAGE_SIZE}} is queried on texture images with an uncompressed internal format or on proxy targets.
+
{{enum|GL_INVALID_OPERATION}} is generated if {{enum|GL_TEXTURE_COMPRESSED_IMAGE_SIZE}} is queried on texture images with an uncompressed internal format or on proxy targets.
  
 
== See Also ==
 
== See Also ==
  
[[GLAPI/glActiveTexture|glActiveTexture]], [[GLAPI/glGetTexParameter|glGetTexParameter]], [[GLAPI/glCopyTexImage1D|glCopyTexImage1D]], [[GLAPI/glCopyTexImage2D|glCopyTexImage2D]], [[GLAPI/glCopyTexSubImage1D|glCopyTexSubImage1D]], [[GLAPI/glCopyTexSubImage2D|glCopyTexSubImage2D]], [[GLAPI/glCopyTexSubImage3D|glCopyTexSubImage3D]], [[GLAPI/glTexImage1D|glTexImage1D]], [[GLAPI/glTexImage2D|glTexImage2D]], [[GLAPI/glTexImage3D|glTexImage3D]], [[GLAPI/glTexSubImage1D|glTexSubImage1D]], [[GLAPI/glTexSubImage2D|glTexSubImage2D]], [[GLAPI/glTexSubImage3D|glTexSubImage3D]], [[GLAPI/glTexParameter|glTexParameter]]
+
{{apifunc|glActiveTexture}}, {{apifunc|glBindTexture}}, {{apifunc|glGetTexParameter}}
  
 
== Copyright ==
 
== Copyright ==
  
Copyright © 1991-2006 Silicon Graphics, Inc. Copyright © 2010 Khronos Group. This document is licensed under the SGI Free Software B License. For details, see [http://oss.sgi.com/projects/FreeB/ http://oss.sgi.com/projects/FreeB/].
+
Copyright © 1991-2006 Silicon Graphics, Inc. Copyright © 2010-2013 Khronos Group. This document is licensed under the SGI Free Software B License. For details, see [http://oss.sgi.com/projects/FreeB/ http://oss.sgi.com/projects/FreeB/].
  
[[Category:API Reference 4|GetTexLevelParameter]]
+
[[Category:Core API Reference|GetTexLevelParameter]]
[[Category:GL 4 API Texturing|GetTexLevelParameter]]
+
[[Category:Core API Ref Texturing|GetTexLevelParameter]]
 +
[[Category:Texture Object API State Functions|GetTexLevelParameter]]

Latest revision as of 10:01, 15 August 2013

glGetTexLevelParameter
Core in version 4.6
Core since version 1.0

glGetTexLevelParameter: return texture parameter values for a specific level of detail

Function Definition

 void glGetTexLevelParameterfv(GLenum target​, GLint level​, GLenum pname​, GLfloat * params​);
 void glGetTexLevelParameteriv(GLenum target​, GLint level​, GLenum pname​, GLint * params​);
target
Specifies the symbolic name of the target texture, one of GL_TEXTURE_1D, GL_TEXTURE_2D, GL_TEXTURE_3D, GL_TEXTURE_1D_ARRAY, GL_TEXTURE_2D_ARRAY, GL_TEXTURE_RECTANGLE, GL_TEXTURE_2D_MULTISAMPLE, GL_TEXTURE_2D_MULTISAMPLE_ARRAY, GL_TEXTURE_CUBE_MAP_POSITIVE_X, GL_TEXTURE_CUBE_MAP_NEGATIVE_X, GL_TEXTURE_CUBE_MAP_POSITIVE_Y, GL_TEXTURE_CUBE_MAP_NEGATIVE_Y, GL_TEXTURE_CUBE_MAP_POSITIVE_Z, GL_TEXTURE_CUBE_MAP_NEGATIVE_Z, GL_PROXY_TEXTURE_1D, GL_PROXY_TEXTURE_2D, GL_PROXY_TEXTURE_3D, GL_PROXY_TEXTURE_1D_ARRAY, GL_PROXY_TEXTURE_2D_ARRAY, GL_PROXY_TEXTURE_RECTANGLE, GL_PROXY_TEXTURE_2D_MULTISAMPLE, GL_PROXY_TEXTURE_2D_MULTISAMPLE_ARRAY, GL_PROXY_TEXTURE_CUBE_MAP, or GL_TEXTURE_BUFFER.
level
Specifies the level-of-detail number of the desired image. Level 0 is the base image level. Level n is the nth mipmap reduction image.
pname
Specifies the symbolic name of a texture parameter.
params
Returns the requested data.

Description

glGetTexLevelParameter returns in params​ 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_TEXTURE_3D, GL_PROXY_TEXTURE_1D, GL_PROXY_TEXTURE_2D, GL_PROXY_TEXTURE_3D, GL_TEXTURE_CUBE_MAP_POSITIVE_X, GL_TEXTURE_CUBE_MAP_NEGATIVE_X, GL_TEXTURE_CUBE_MAP_POSITIVE_Y, GL_TEXTURE_CUBE_MAP_NEGATIVE_Y, GL_TEXTURE_CUBE_MAP_POSITIVE_Z, GL_TEXTURE_CUBE_MAP_NEGATIVE_Z, or GL_PROXY_TEXTURE_CUBE_MAP.

GL_MAX_TEXTURE_SIZE, and GL_MAX_3D_TEXTURE_SIZE are not really descriptive enough. It has to report the largest square texture image that can be accommodated with mipmaps but a long skinny texture, or a texture without mipmaps 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
params​ returns a single value, the width of the texture image. This value includes the border of the texture image. The initial value is 0.
GL_TEXTURE_HEIGHT
params​ returns a single value, the height of the texture image. This value includes the border of the texture image. The initial value is 0.
GL_TEXTURE_DEPTH
params​ returns a single value, the depth of the texture image. This value includes the border of the texture image. The initial value is 0.
GL_TEXTURE_SAMPLES
params​ returns a single value, the number of samples in a multisample image. For non-multisample textures, this is 0.
GL_TEXTURE_FIXED_SAMPLE_LOCATIONS
params​ returns a boolean value. GL_TRUE if the sample locations are fixed, and GL_FALSE otherwise.
GL_TEXTURE_INTERNAL_FORMAT
params​ returns a single value, the internal format of the texture image.
GL_TEXTURE_RED_TYPE, GL_TEXTURE_GREEN_TYPE, GL_TEXTURE_BLUE_TYPE, GL_TEXTURE_ALPHA_TYPE, GL_TEXTURE_DEPTH_TYPE
GL_TEXTURE_RED_SIZE, GL_TEXTURE_GREEN_SIZE, GL_TEXTURE_BLUE_SIZE, GL_TEXTURE_ALPHA_SIZE, GL_TEXTURE_DEPTH_SIZE, GL_TEXTURE_STENCIL_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 the component argument of glTexImage1D, glTexImage2D, glTexImage3D, glCopyTexImage1D, and glCopyTexImage2D. The initial value is 0.
GL_TEXTURE_SHARED_SIZE
params​ will store a single value, the number of bits in the shared exponent of the Image Format. If the image format doesn't have a shared exponent, then it is 0.
The data type used to store the component. The types GL_NONE, GL_SIGNED_NORMALIZED, GL_UNSIGNED_NORMALIZED, GL_FLOAT, GL_INT, and GL_UNSIGNED_INT may be returned to indicate signed normalized fixed-point, unsigned normalized fixed-point, floating-point, integer unnormalized, and unsigned integer unnormalized components, respectively.
GL_TEXTURE_COMPRESSED
params​ returns a single boolean value indicating if the texture image is stored in a compressed internal format. The initiali value is GL_FALSE.
GL_TEXTURE_COMPRESSED_IMAGE_SIZE
params​ returns a single integer value, the number of unsigned bytes of the compressed texture image that would be returned from glGetCompressedTexImage.
GL_TEXTURE_BUFFER_DATA_STORE_BINDING
For Buffer Textures, the buffer object (if any) attached to this mipmap level. For non-buffer textures, this is 0.
GL_TEXTURE_BUFFER_OFFSET
params​ returns a single integer value, the offset into the data store of the buffer bound to a buffer texture. glTexBufferRange.
GL_TEXTURE_BUFFER_SIZE
params​ returns a single integer value, the size of the range of a data store of the buffer bound to a buffer texture. glTexBufferRange.

Notes

If an error is generated, no change is made to the contents of params​.

glGetTexLevelParameter returns the texture level parameters for the active texture unit.

GL_TEXTURE_BUFFER_OFFSET and GL_TEXTURE_BUFFER_SIZE 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.

GL_INVALID_VALUE is generated if level​ is less than 0.

GL_INVALID_VALUE may be generated if level​ is greater than log2(max), where max is the returned value of GL_MAX_TEXTURE_SIZE.

GL_INVALID_VALUE is generated if target​ is GL_TEXTURE_BUFFER and level​ is not zero.

GL_INVALID_OPERATION is generated if GL_TEXTURE_COMPRESSED_IMAGE_SIZE is queried on texture images with an uncompressed internal format or on proxy targets.

See Also

glActiveTexture, glBindTexture, glGetTexParameter

Copyright

Copyright © 1991-2006 Silicon Graphics, Inc. Copyright © 2010-2013 Khronos Group. This document is licensed under the SGI Free Software B License. For details, see http://oss.sgi.com/projects/FreeB/.