[  Next Article  |
Previous Article  |
Book Contents |
Library Home |
Legal |
Search ]
OpenGL 1.2 for AIX: Reference Manual
glGetTexLevelParameter Subroutine
Purpose
Returns texture parameter values for a specific 
level of detail.
Library
OpenGL C bindings library: 
libGL.a
C Syntax
void glGetTexLevelParameterfv(GLenum target,
                              GLint level, 
                              GLenum pname, 
                              GLfloat *params)
void glGetTexLevelParameteriv(GLenum target,
                              GLint level, 
                              GLenum pname, 
                              GLint *params)
Description
The glGetTexLevelParameter subroutine 
returns in params texture parameter values for a specific level-of-detail 
value, specified as level.  The target parameter defines the 
target texture, either GL_TEXTURE_1D, GL_TEXTURE_2D, 
GL_TEXTURE_3D, GL_TEXTURE_3D_EXT, GL_PROXY_TEXTURE_1D, 
GL_PROXY_TEXTURE_2D, GL_PROXY_TEXTURE_3D, or 
GL_PROXY_TEXTURE_3D_EXT.
The GL_MAX_TEXTURE_SIZE parameter 
reports the largest square texture image which can be accomodated 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 accomodate a texture of a given 
configuration.  If the texture cannot be accomodated, the texture state 
variables (which may be queried with glGetTexLevelParameter) are set to 
0.  If the texture can be accomodated the texture state values will be set as 
they would be set for a non-proxy target.
The pname parameter specifies the 
texture parameter whose value or values will be returned.
The accepted parameter names are as follows:
| GL_TEXTURE_ALPHA_SIZE | 
  The internal storage resolution of an individual alpha 
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, or glTexImage3DEXT. The initial 
value is 0.  | 
| GL_TEXTURE_BLUE_SIZE | 
  The internal storage resolution of an individual blue 
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, or glTexImage3DEXT. The initial 
value is 0.  | 
| GL_TEXTURE_BORDER | 
  params returns a single value, the width in pixels of the 
border of the texture image. The inital 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_DEPTH_EXT | 
  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_GREEN_SIZE | 
  The internal storage resolution of an individual green 
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, or glTexImage3DEXT. 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_INTENSITY_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 or 
glTexImage2D. The initial value is 0. | 
| GL_TEXTURE_INTERNAL_FORMAT | 
  params returns a single value, the requested internal format 
of the texture image. | 
| GL_TEXTURE_LUMINANCE_SIZE | 
  The internal storage resolution of an individual luminance 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, or glTexImage3DEXT. The initial 
value is 0. | 
| GL_TEXTURE_RED_SIZE | 
  The internal storage resolution of an individual red 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, or glTexImage3DEXT. The initial 
value is 0. | 
| 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. | 
Parameters
| target | 
Specifies the symbolic name of the target texture, either 
GL_TEXTURE_1D, GL_TEXTURE_2D, GL_TEXTURE_3D, 
GL_PROXY_TEXTURE_1D, or GL_PROXY_TEXTURE_2D, 
GL_PROXY_TEXTURE_3D, GL_PROXY_TEXTURE_3D_EXT, 
GL_TEXTURE_3D_EXT. | 
| 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_DEPTH, GL_TEXTURE_DEPTH_EXT, GL_TEXTURE_WIDTH, 
GL_TEXTURE_HEIGHT, 
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_LUMINANCE_SIZE, and GL_TEXTURE_INTENSITY_SIZE are 
accepted. | 
| params | 
  Returns the requested data. | 
Notes
If an error is generated, no change is made 
to the contents of params.
The GL_TEXTURE_INTERNAL_FORMAT parameter 
is only available if the GL version is 1.1 or greater. In version 1.0, use 
GL_TEXTURE_COMPONENTS instead. 
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 zero.
GL_INVALID_VALUE may be generated if 
level is greater than log sub 2 max, where max is the returned value of 
GL_MAX_TEXTURE_SIZE.
GL_INVALID_OPERATION is generated if 
glGetTexLevelParameter is executed between the execution of 
glBegin and the corresponding execution of glEnd.
Files
| /usr/include/GL/gl.h | 
  Contains C language constants, variable type definitions, and ANSI 
function prototypes for OpenGL. | 
Related Information
The glGetTexParameter 
subroutine, glTexImage1D 
subroutine, glTexImage2D 
subroutine, glTexParameter subroutine.
OpenGL Overview.
[  Next Article  |
Previous Article  |
Book Contents |
Library Home |
Legal |
Search ]