1GLGETTEXLEVELPARAMET(3G) [FIXME: manual] GLGETTEXLEVELPARAMET(3G)
2
3
4
6 glGetTexLevelParameter - return texture parameter values for a specific
7 level of detail
8
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
16 void glGetTextureLevelParameterfv(GLuint texture, GLint level,
17 GLenum pname, GLfloat *params);
18
19 void glGetTextureLevelParameteriv(GLuint texture, GLint level,
20 GLenum pname, GLint *params);
21
23 target
24 Specifies the target to which the texture is bound for
25 glGetTexLevelParameterfv and glGetTexLevelParameteriv functions.
26 Must be one of the following values: GL_TEXTURE_1D, GL_TEXTURE_2D,
27 GL_TEXTURE_3D, GL_TEXTURE_1D_ARRAY, GL_TEXTURE_2D_ARRAY,
28 GL_TEXTURE_RECTANGLE, GL_TEXTURE_2D_MULTISAMPLE,
29 GL_TEXTURE_2D_MULTISAMPLE_ARRAY, GL_TEXTURE_CUBE_MAP_POSITIVE_X,
30 GL_TEXTURE_CUBE_MAP_NEGATIVE_X, GL_TEXTURE_CUBE_MAP_POSITIVE_Y,
31 GL_TEXTURE_CUBE_MAP_NEGATIVE_Y, GL_TEXTURE_CUBE_MAP_POSITIVE_Z,
32 GL_TEXTURE_CUBE_MAP_NEGATIVE_Z, GL_PROXY_TEXTURE_1D,
33 GL_PROXY_TEXTURE_2D, GL_PROXY_TEXTURE_3D,
34 GL_PROXY_TEXTURE_1D_ARRAY, GL_PROXY_TEXTURE_2D_ARRAY,
35 GL_PROXY_TEXTURE_RECTANGLE, GL_PROXY_TEXTURE_2D_MULTISAMPLE,
36 GL_PROXY_TEXTURE_2D_MULTISAMPLE_ARRAY, GL_PROXY_TEXTURE_CUBE_MAP,
37 or GL_TEXTURE_BUFFER.
38
39 texture
40 Specifies the texture object name for glGetTextureLevelParameterfv
41 and glGetTextureLevelParameteriv functions.
42
43 level
44 Specifies the level-of-detail number of the desired image. Level 0
45 is the base image level. Level n is the nth mipmap reduction image.
46
47 pname
48 Specifies the symbolic name of a texture parameter.
49 GL_TEXTURE_WIDTH, GL_TEXTURE_HEIGHT, GL_TEXTURE_DEPTH,
50 GL_TEXTURE_INTERNAL_FORMAT, GL_TEXTURE_RED_SIZE,
51 GL_TEXTURE_GREEN_SIZE, GL_TEXTURE_BLUE_SIZE, GL_TEXTURE_ALPHA_SIZE,
52 GL_TEXTURE_DEPTH_SIZE, GL_TEXTURE_COMPRESSED,
53 GL_TEXTURE_COMPRESSED_IMAGE_SIZE, and GL_TEXTURE_BUFFER_OFFSET are
54 accepted.
55
56 params
57 Returns the requested data.
58
60 glGetTexLevelParameterfv, glGetTexLevelParameteriv,
61 glGetTextureLevelParameterfv and glGetTextureLevelParameteriv return in
62 params texture parameter values for a specific level-of-detail value,
63 specified as level. For the first two functions, target defines the
64 target texture, either GL_TEXTURE_1D, GL_TEXTURE_2D, GL_TEXTURE_3D,
65 GL_PROXY_TEXTURE_1D, GL_PROXY_TEXTURE_2D, GL_PROXY_TEXTURE_3D,
66 GL_TEXTURE_CUBE_MAP_POSITIVE_X, GL_TEXTURE_CUBE_MAP_NEGATIVE_X,
67 GL_TEXTURE_CUBE_MAP_POSITIVE_Y, GL_TEXTURE_CUBE_MAP_NEGATIVE_Y,
68 GL_TEXTURE_CUBE_MAP_POSITIVE_Z, GL_TEXTURE_CUBE_MAP_NEGATIVE_Z, or
69 GL_PROXY_TEXTURE_CUBE_MAP. The remaining two take a texture argument
70 which specifies the name of the texture object.
71
72 GL_MAX_TEXTURE_SIZE, and GL_MAX_3D_TEXTURE_SIZE are not really
73 descriptive enough. It has to report the largest square texture image
74 that can be accommodated with mipmaps but a long skinny texture, or a
75 texture without mipmaps may easily fit in texture memory. The proxy
76 targets allow the user to more accurately query whether the GL can
77 accommodate a texture of a given configuration. If the texture cannot
78 be accommodated, the texture state variables, which may be queried with
79 glGetTexLevelParameter and glGetTextureLevelParameter, are set to 0. If
80 the texture can be accommodated, the texture state values will be set
81 as they would be set for a non-proxy target.
82
83 pname specifies the texture parameter whose value or values will be
84 returned.
85
86 The accepted parameter names are as follows:
87
88 GL_TEXTURE_WIDTH
89 params returns a single value, the width of the texture image. The
90 initial value is 0.
91
92 GL_TEXTURE_HEIGHT
93 params returns a single value, the height of the texture image. The
94 initial value is 0.
95
96 GL_TEXTURE_DEPTH
97 params returns a single value, the depth of the texture image. The
98 initial value is 0.
99
100 GL_TEXTURE_INTERNAL_FORMAT
101 params returns a single value, the internal format of the texture
102 image.
103
104 GL_TEXTURE_RED_TYPE, GL_TEXTURE_GREEN_TYPE, GL_TEXTURE_BLUE_TYPE,
105 GL_TEXTURE_ALPHA_TYPE, GL_TEXTURE_DEPTH_TYPE
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, GL_TEXTURE_GREEN_SIZE, GL_TEXTURE_BLUE_SIZE,
114 GL_TEXTURE_ALPHA_SIZE, GL_TEXTURE_DEPTH_SIZE
115
116 The internal storage resolution of an individual component. The
117 resolution chosen by the GL will be a close match for the
118 resolution requested by the user with the component argument of
119 glTexImage1D(), glTexImage2D(), glTexImage3D(), glCopyTexImage1D(),
120 and glCopyTexImage2D(). The initial value is 0.
121
122 GL_TEXTURE_COMPRESSED
123
124 params returns a single boolean value indicating if the texture
125 image is stored in a compressed internal format. The initiali value
126 is GL_FALSE.
127
128 GL_TEXTURE_COMPRESSED_IMAGE_SIZE
129
130 params returns a single integer value, the number of unsigned bytes
131 of the compressed texture image that would be returned from
132 glGetCompressedTexImage().
133
134 GL_TEXTURE_BUFFER_OFFSET
135
136 params returns a single integer value, the offset into the data
137 store of the buffer bound to a buffer texture. glTexBufferRange().
138
139 GL_TEXTURE_BUFFER_SIZE
140
141 params returns a single integer value, the size of the range of a
142 data store of the buffer bound to a buffer texture.
143 glTexBufferRange().
144
146 If an error is generated, no change is made to the contents of params.
147
148 glGetTexLevelParameter returns the texture level parameters for the
149 active texture unit.
150
151 GL_TEXTURE_BUFFER_OFFSET and GL_TEXTURE_BUFFER_SIZE are available only
152 if the GL version is 4.3 or greater.
153
155 GL_INVALID_OPERATION is generated by glGetTextureLevelParameterfv and
156 glGetTextureLevelParameteriv functions if texture is not the name of an
157 existing texture object.
158
159 GL_INVALID_ENUM is generated by glGetTexLevelParameterfv and
160 glGetTexLevelParameteriv functions if target or pname is not an
161 accepted value.
162
163 GL_INVALID_VALUE is generated if level is less than 0.
164
165 GL_INVALID_VALUE may be generated if level is greater than log 2 max,
166 where max is the returned value of GL_MAX_TEXTURE_SIZE.
167
168 GL_INVALID_VALUE is generated if target is GL_TEXTURE_BUFFER and level
169 is not zero.
170
171 GL_INVALID_OPERATION is generated if GL_TEXTURE_COMPRESSED_IMAGE_SIZE
172 is queried on texture images with an uncompressed internal format or on
173 proxy targets.
174
176 ┌─────────────────────────────┬───────────────────────────────────────────────────────────────────────┐
177 │ │ OpenGL Version │
178 ├─────────────────────────────┼─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┤
179 │Function │ 2.0 │ 2.1 │ 3.0 │ 3.1 │ 3.2 │ 3.3 │ 4.0 │ 4.1 │ 4.2 │ 4.3 │ 4.4 │ 4.5 │
180 │/ │ │ │ │ │ │ │ │ │ │ │ │ │
181 │Feature │ │ │ │ │ │ │ │ │ │ │ │ │
182 │Name │ │ │ │ │ │ │ │ │ │ │ │ │
183 ├─────────────────────────────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
184 │glGetTexLevelParameterfv │ ✔ │ ✔ │ ✔ │ ✔ │ ✔ │ ✔ │ ✔ │ ✔ │ ✔ │ ✔ │ ✔ │ ✔ │
185 ├─────────────────────────────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
186 │glGetTexLevelParameteriv │ ✔ │ ✔ │ ✔ │ ✔ │ ✔ │ ✔ │ ✔ │ ✔ │ ✔ │ ✔ │ ✔ │ ✔ │
187 ├─────────────────────────────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
188 │glGetTextureLevelParameterfv │ - │ - │ - │ - │ - │ - │ - │ - │ - │ - │ - │ ✔ │
189 ├─────────────────────────────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
190 │glGetTextureLevelParameteriv │ - │ - │ - │ - │ - │ - │ - │ - │ - │ - │ - │ ✔ │
191 └─────────────────────────────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┘
192
194 glActiveTexture(), glGetTexParameter(), glCopyTexImage1D(),
195 glCopyTexImage2D(), glCopyTexSubImage1D(), glCopyTexSubImage2D(),
196 glCopyTexSubImage3D(), glTexImage1D(), glTexImage2D(), glTexImage3D(),
197 glTexSubImage1D(), glTexSubImage2D(), glTexSubImage3D(),
198 glTexParameter()
199
201 Copyright © 1991-2006 Silicon Graphics, Inc. Copyright © 2010-2014
202 Khronos Group. This document is licensed under the SGI Free Software B
203 License. For details, see http://oss.sgi.com/projects/FreeB/.
204
206 Copyright © 2014 Khronos Group
207
208
209
210[FIXME: source] 03/06/2019 GLGETTEXLEVELPARAMET(3G)