_C_ License Applicability. Except to the extent portions of this file are
_C_ made subject to an alternative license as permitted in the SGI Free
_C_ Software License B, Version 1.1 (the "License"), the contents of this
_C_ file are subject only to the provisions of the License. You may not use
_C_ this file except in compliance with the License. You may obtain a copy
_C_ of the License at Silicon Graphics, Inc., attn: Legal Services, 1600
_C_ Amphitheatre Parkway, Mountain View, CA 94043-1351, or at:
_C_ 
_C_ http://oss.sgi.com/projects/FreeB
_C_ 
_C_ Note that, as provided in the License, the Software is distributed on an
_C_ "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS
_C_ DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND
_C_ CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A
_C_ PARTICULAR PURPOSE, AND NON-INFRINGEMENT.
_C_ 
_C_ Original Code. The Original Code is: OpenGL Sample Implementation,
_C_ Version 1.2.1, released January 26, 2000, developed by Silicon Graphics,
_C_ Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc.
_C_ Copyright in any portions created by third parties is as indicated
_C_ elsewhere herein. All Rights Reserved.
_C_ 
_C_ Additional Notice Provisions: The application programming interfaces
_C_ established by SGI in conjunction with the Original Code are The
_C_ OpenGL(R) Graphics System: A Specification (Version 1.2.1), released
_C_ April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version
_C_ 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X
_C_ Window System(R) (Version 1.3), released October 19, 1998. This software
_C_ was created using the OpenGL(R) version 1.2.1 Sample Implementation
_C_ published by SGI, but has not been independently verified as being
_C_ compliant with the OpenGL(R) version 1.2.1 Specification.
_C_
_C_ The first character in this file must be an '_'!
_C_ Anything on a line after _C_ is ignored
_define(_filters,eqn)_C_
_C_      eqn is automatically replaced with neqn for nroff
_header(GetTexLevelParameter,return texture parameter values for a specific level of detail)
_names(GetTexLevelParameter,[fi]v)
.EQ
delim $$
.EN
.SH PARAMETERS
_phead(_param1)
Specifies the symbolic name of the target texture,
either _const(TEXTURE_1D), _const(TEXTURE_2D), _const(TEXTURE_3D),
_const(PROXY_TEXTURE_1D), _const(PROXY_TEXTURE_2D), or
_const(PROXY_TEXTURE_3D).
_phead(_param2)
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.
_phead(_param3)
Specifies the symbolic name of a texture parameter.
_const(TEXTURE_WIDTH),
_const(TEXTURE_HEIGHT),
_const(TEXTURE_DEPTH),
_const(TEXTURE_INTERNAL_FORMAT),
_const(TEXTURE_BORDER),
_const(TEXTURE_RED_SIZE),
_const(TEXTURE_GREEN_SIZE),
_const(TEXTURE_BLUE_SIZE),
_const(TEXTURE_ALPHA_SIZE),
_const(TEXTURE_LUMINANCE_SIZE), and
_const(TEXTURE_INTENSITY_SIZE) are accepted.
_phead(_param4)
Returns the requested data.
.SH DESCRIPTION
_cmnd returns in _param4 texture parameter values for a specific 
level-of-detail value,
specified as _param2.
_param1 defines the target texture,
either _const(TEXTURE_1D), _const(TEXTURE_2D), _const(TEXTURE_3D),
_const(PROXY_TEXTURE_1D), 
_const(PROXY_TEXTURE_2D), or
_const(PROXY_TEXTURE_3D).
.BR
.P
_const(MAX_TEXTURE_SIZE), and _const(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 _cmnd, 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.
.P
_param3 specifies the texture parameter whose value or values
will be returned.
.P
The accepted parameter names are as follows:
.TP 10
_const(TEXTURE_WIDTH)
_param4 returns a single value,
the width of the texture image.
This value includes the border of the texture image. The initial value is
0. 
.TP
_const(TEXTURE_HEIGHT)
_param4 returns a single value,
the height of the texture image.
This value includes the border of the texture image. The initial value is
0.
.TP
_const(TEXTURE_DEPTH)
_param4 returns a single value,
the depth of the texture image.
This value includes the border of the texture image. The initial value is
0.
.TP
_const(TEXTURE_INTERNAL_FORMAT)
_param4 returns a single value,
the internal format of the texture image. 
.TP
_const(TEXTURE_BORDER)
_param4 returns a single value,
the width in pixels of the border of the texture image. The initial value
is 0. 
.TP
_const(TEXTURE_RED_SIZE),
.TP
_const(TEXTURE_GREEN_SIZE),
.TP
_const(TEXTURE_BLUE_SIZE),
.TP
_const(TEXTURE_ALPHA_SIZE),
.TP
_const(TEXTURE_LUMINANCE_SIZE), 
.TP
_const(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 _cmnd(TexImage1D),
_cmnd(TexImage2D), _cmnd(TexImage3D), _cmnd(CopyTexImage1D), and
_cmnd(CopyTexImage2D). The initial value is 0. 
.SH NOTES
If an error is generated,
no change is made to the contents of _param4.
.P
_const(TEXTURE_INTERNAL_FORMAT) is available only if the GL version is
1.1 or greater. In version 1.0, use _const(TEXTURE_COMPONENTS)
instead.
.P
_const(PROXY_TEXTURE_1D) and _const(PROXY_TEXTURE_2D) are 
available only if the GL version is 1.1 or greater.
.P
_const(TEXTURE_3D), _const(PROXY_TEXTURE_3D), and _const(TEXTURE_DEPTH)
are available only if the GL version is 1.2 or greater.
.P
When the _arbstring(multitexture) extension is supported, _cmnd returns
the texture level parameters for the active texture unit.
.SH ERRORS
_const(INVALID_ENUM) is generated if _param1 or _param3 is not an
accepted value.
.P
_const(INVALID_VALUE) is generated if _param2 is less than 0.
.P 
_const(INVALID_VALUE) may be generated if _param2 is greater
than $ log sub 2$ \f2max\fP,
where \f2max\fP is the returned value of _const(MAX_TEXTURE_SIZE).
.P
_const(INVALID_OPERATION) is generated if _cmnd
is executed between the execution of _cmnd(Begin)
and the corresponding execution of _cmnd(End).
.SH SEE ALSO
_cmnd(ActiveTextureARB),
_cmnd(GetTexParameter),
_cmnd(CopyTexImage1D),
_cmnd(CopyTexImage2D),
_cmnd(CopyTexSubImage1D),
_cmnd(CopyTexSubImage2D),
_cmnd(CopyTexSubImage3D),
_cmnd(TexEnv),
_cmnd(TexGen),
_cmnd(TexImage1D),
_cmnd(TexImage2D),
_cmnd(TexImage3D),
_cmnd(TexSubImage1D),
_cmnd(TexSubImage2D),
_cmnd(TexSubImage3D),
_cmnd(TexParameter)
