Difference between revisions of "GlGetTexLevelParameter"

From QB64 Wiki
Jump to navigation Jump to search
imported>Galleon
(Created page with ''''_glGetTexLevelParameter:''' return texture parameter values for a specific level of detail {{PageSyntax}} SUB _glGetTexLevelParameterfv (BYVAL target AS _UNSIGNED LONG, B…')
 
(No difference)

Latest revision as of 10:17, 8 January 2013

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


Syntax

 SUB _glGetTexLevelParameterfv (BYVAL target AS _UNSIGNED LONG, BYVAL level AS LONG, BYVAL pname AS _UNSIGNED LONG, params AS SINGLE)
 void _glGetTexLevelParameterfv(GLenum target, GLint level, GLenum pname, GLfloat * params);
 SUB _glGetTexLevelParameteriv (BYVAL target AS _UNSIGNED LONG, BYVAL level AS LONG, BYVAL pname AS _UNSIGNED LONG, params AS LONG)
 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. _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_DEPTH_SIZE, _GL_TEXTURE_COMPRESSED, _GL_TEXTURE_COMPRESSED_IMAGE_SIZE, and _GL_TEXTURE_BUFFER_OFFSET are accepted.
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 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

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_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

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_RED_SIZE,
 ; _GL_TEXTURE_GREEN_SIZE,
 ; _GL_TEXTURE_BLUE_SIZE,
 ; _GL_TEXTURE_ALPHA_SIZE,
 ; _GL_TEXTURE_DEPTH_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_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_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 log<sub>2</sub>(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

_GL _glActiveTexture, _glBindTexture, _glGetTexParameter


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



Navigation:
Go to Keyword Reference - Alphabetical
Go to Keyword Reference - By usage
Go to Main WIKI Page

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/.