1GLGETTEXLEVELPARAMET(3G)         OpenGL Manual        GLGETTEXLEVELPARAMET(3G)
2
3
4

NAME

6       glGetTexLevelParameter - return texture parameter values for a specific
7       level of detail
8

C SPECIFICATION

10       void glGetTexLevelParameterfv(GLenum target, GLint level, GLenum pname,
11                                     GLfloat * params);
12
13       void glGetTexLevelParameteriv(GLenum target, GLint level, GLenum pname,
14                                     GLint * params);
15

PARAMETERS

17       target
18           Specifies the symbolic name of the target texture, one of
19           GL_TEXTURE_1D, GL_TEXTURE_2D, GL_TEXTURE_3D, GL_TEXTURE_1D_ARRAY,
20           GL_TEXTURE_2D_ARRAY, GL_TEXTURE_RECTANGLE,
21           GL_TEXTURE_2D_MULTISAMPLE, GL_TEXTURE_2D_MULTISAMPLE_ARRAY,
22           GL_TEXTURE_CUBE_MAP_POSITIVE_X, GL_TEXTURE_CUBE_MAP_NEGATIVE_X,
23           GL_TEXTURE_CUBE_MAP_POSITIVE_Y, GL_TEXTURE_CUBE_MAP_NEGATIVE_Y,
24           GL_TEXTURE_CUBE_MAP_POSITIVE_Z, GL_TEXTURE_CUBE_MAP_NEGATIVE_Z,
25           GL_PROXY_TEXTURE_1D, GL_PROXY_TEXTURE_2D, GL_PROXY_TEXTURE_3D,
26           GL_PROXY_TEXTURE_1D_ARRAY, GL_PROXY_TEXTURE_2D_ARRAY,
27           GL_PROXY_TEXTURE_RECTANGLE, GL_PROXY_TEXTURE_2D_MULTISAMPLE,
28           GL_PROXY_TEXTURE_2D_MULTISAMPLE_ARRAY, GL_PROXY_TEXTURE_CUBE_MAP,
29           or GL_TEXTURE_BUFFER.
30
31       level
32           Specifies the level-of-detail number of the desired image. Level 0
33           is the base image level. Level n is the nth mipmap reduction image.
34
35       pname
36           Specifies the symbolic name of a texture parameter.
37           GL_TEXTURE_WIDTH, GL_TEXTURE_HEIGHT, GL_TEXTURE_DEPTH,
38           GL_TEXTURE_INTERNAL_FORMAT, GL_TEXTURE_BORDER, GL_TEXTURE_RED_SIZE,
39           GL_TEXTURE_GREEN_SIZE, GL_TEXTURE_BLUE_SIZE, GL_TEXTURE_ALPHA_SIZE,
40           GL_TEXTURE_DEPTH_SIZE, GL_TEXTURE_COMPRESSED,
41           GL_TEXTURE_COMPRESSED_IMAGE_SIZE, and GL_TEXTURE_BUFFER_OFFSET are
42           accepted.
43
44       params
45           Returns the requested data.
46

DESCRIPTION

48       glGetTexLevelParameter returns in params texture parameter values for a
49       specific level-of-detail value, specified as level.  target defines the
50       target texture, either GL_TEXTURE_1D, GL_TEXTURE_2D, GL_TEXTURE_3D,
51       GL_PROXY_TEXTURE_1D, GL_PROXY_TEXTURE_2D, GL_PROXY_TEXTURE_3D,
52       GL_TEXTURE_CUBE_MAP_POSITIVE_X, GL_TEXTURE_CUBE_MAP_NEGATIVE_X,
53       GL_TEXTURE_CUBE_MAP_POSITIVE_Y, GL_TEXTURE_CUBE_MAP_NEGATIVE_Y,
54       GL_TEXTURE_CUBE_MAP_POSITIVE_Z, GL_TEXTURE_CUBE_MAP_NEGATIVE_Z, or
55       GL_PROXY_TEXTURE_CUBE_MAP.
56
57       GL_MAX_TEXTURE_SIZE, and GL_MAX_3D_TEXTURE_SIZE are not really
58       descriptive enough. It has to report the largest square texture image
59       that can be accommodated with mipmaps and borders, but a long skinny
60       texture, or a texture without mipmaps and borders, may easily fit in
61       texture memory. The proxy targets allow the user to more accurately
62       query whether the GL can accommodate a texture of a given
63       configuration. If the texture cannot be accommodated, the texture state
64       variables, which may be queried with glGetTexLevelParameter, are set to
65       0. If the texture can be accommodated, the texture state values will be
66       set as they would be set for a non-proxy target.
67
68       pname specifies the texture parameter whose value or values will be
69       returned.
70
71       The accepted parameter names are as follows:
72
73       GL_TEXTURE_WIDTH
74
75           params returns a single value, the width of the texture image. This
76           value includes the border of the texture image. The initial value
77           is 0.
78
79       GL_TEXTURE_HEIGHT
80
81           params returns a single value, the height of the texture image.
82           This value includes the border of the texture image. The initial
83           value is 0.
84
85       GL_TEXTURE_DEPTH
86
87           params returns a single value, the depth of the texture image. This
88           value includes the border of the texture image. The initial value
89           is 0.
90
91       GL_TEXTURE_INTERNAL_FORMAT
92
93           params returns a single value, the internal format of the texture
94           image.
95
96       GL_TEXTURE_RED_TYPE,
97
98       GL_TEXTURE_GREEN_TYPE,
99
100       GL_TEXTURE_BLUE_TYPE,
101
102       GL_TEXTURE_ALPHA_TYPE,
103
104       GL_TEXTURE_DEPTH_TYPE
105
106           The data type used to store the component. The types GL_NONE,
107           GL_SIGNED_NORMALIZED, GL_UNSIGNED_NORMALIZED, GL_FLOAT, GL_INT, and
108           GL_UNSIGNED_INT may be returned to indicate signed normalized
109           fixed-point, unsigned normalized fixed-point, floating-point,
110           integer unnormalized, and unsigned integer unnormalized components,
111           respectively.
112
113       GL_TEXTURE_RED_SIZE,
114
115       GL_TEXTURE_GREEN_SIZE,
116
117       GL_TEXTURE_BLUE_SIZE,
118
119       GL_TEXTURE_ALPHA_SIZE,
120
121       GL_TEXTURE_DEPTH_SIZE
122
123           The internal storage resolution of an individual component. The
124           resolution chosen by the GL will be a close match for the
125           resolution requested by the user with the component argument of
126           glTexImage1D(), glTexImage2D(), glTexImage3D(), glCopyTexImage1D(),
127           and glCopyTexImage2D(). The initial value is 0.
128
129       GL_TEXTURE_COMPRESSED
130
131           params returns a single boolean value indicating if the texture
132           image is stored in a compressed internal format. The initiali value
133           is GL_FALSE.
134
135       GL_TEXTURE_COMPRESSED_IMAGE_SIZE
136
137           params returns a single integer value, the number of unsigned bytes
138           of the compressed texture image that would be returned from
139           glGetCompressedTexImage().
140
141       GL_TEXTURE_BUFFER_OFFSET
142
143           params returns a single integer value, the offset into the data
144           store of the buffer bound to a buffer texture.  glTexBufferRange().
145
146       GL_TEXTURE_BUFFER_SIZE
147
148           params returns a single integer value, the size of the range of a
149           data store of the buffer bound to a buffer texture.
150           glTexBufferRange().
151

NOTES

153       If an error is generated, no change is made to the contents of params.
154
155       glGetTexLevelParameter returns the texture level parameters for the
156       active texture unit.
157
158       GL_TEXTURE_BUFFER_OFFSET and GL_TEXTURE_BUFFER_SIZE are available only
159       if the GL version is 4.3 or greater.
160

ERRORS

162       GL_INVALID_ENUM is generated if target or pname is not an accepted
163       value.
164
165       GL_INVALID_VALUE is generated if level is less than 0.
166
167       GL_INVALID_VALUE may be generated if level is greater than log 2max,
168       where max is the returned value of GL_MAX_TEXTURE_SIZE.
169
170       GL_INVALID_VALUE is generated if target is GL_TEXTURE_BUFFER and level
171       is not zero.
172
173       GL_INVALID_OPERATION is generated if GL_TEXTURE_COMPRESSED_IMAGE_SIZE
174       is queried on texture images with an uncompressed internal format or on
175       proxy targets.
176

SEE ALSO

178       glActiveTexture(), glGetTexParameter(), glCopyTexImage1D(),
179       glCopyTexImage2D(), glCopyTexSubImage1D(), glCopyTexSubImage2D(),
180       glCopyTexSubImage3D(), glTexImage1D(), glTexImage2D(), glTexImage3D(),
181       glTexSubImage1D(), glTexSubImage2D(), glTexSubImage3D(),
182       glTexParameter()
183
185       Copyright © 1991-2006 Silicon Graphics, Inc. Copyright © 2010-2012
186       Khronos Group. This document is licensed under the SGI Free Software B
187       License. For details, see http://oss.sgi.com/projects/FreeB/.
188

AUTHORS

190       opengl.org
191
192
193
194opengl.org                        06/10/2014          GLGETTEXLEVELPARAMET(3G)
Impressum