1GLGETTEXLEVELPARAMETER(3G) GLGETTEXLEVELPARAMETER(3G)
2
3
4
6 glGetTexLevelParameterfv, glGetTexLevelParameteriv - return texture
7 parameter values for a specific level of detail
8
9
11 void glGetTexLevelParameterfv( GLenum target,
12 GLint level,
13 GLenum pname,
14 GLfloat *params )
15 void glGetTexLevelParameteriv( GLenum target,
16 GLint level,
17 GLenum pname,
18 GLint *params )
19
20
22 target Specifies the symbolic name of the target texture, either
23 GL_TEXTURE_1D, GL_TEXTURE_2D, GL_TEXTURE_3D,
24 GL_PROXY_TEXTURE_1D, GL_PROXY_TEXTURE_2D, or
25 GL_PROXY_TEXTURE_3D.
26
27 level Specifies the level-of-detail number of the desired image.
28 Level 0 is the base image level. Level n is the nth mipmap
29 reduction image.
30
31 pname Specifies the symbolic name of a texture parameter.
32 GL_TEXTURE_WIDTH, GL_TEXTURE_HEIGHT, GL_TEXTURE_DEPTH,
33 GL_TEXTURE_INTERNAL_FORMAT, GL_TEXTURE_BORDER,
34 GL_TEXTURE_RED_SIZE, GL_TEXTURE_GREEN_SIZE,
35 GL_TEXTURE_BLUE_SIZE, GL_TEXTURE_ALPHA_SIZE,
36 GL_TEXTURE_LUMINANCE_SIZE, and GL_TEXTURE_INTENSITY_SIZE are
37 accepted.
38
39 params Returns the requested data.
40
42 glGetTexLevelParameter returns in params texture parameter values for a
43 specific level-of-detail value, specified as level. target defines the
44 target texture, either GL_TEXTURE_1D, GL_TEXTURE_2D, GL_TEXTURE_3D,
45 GL_PROXY_TEXTURE_1D, GL_PROXY_TEXTURE_2D, or GL_PROXY_TEXTURE_3D.
46
47 GL_MAX_TEXTURE_SIZE, and GL_MAX_3D_TEXTURE_SIZE are not really descrip‐
48 tive enough. It has to report the largest square texture image that
49 can be accommodated with mipmaps and borders, but a long skinny tex‐
50 ture, or a texture without mipmaps and borders, may easily fit in tex‐
51 ture memory. The proxy targets allow the user to more accurately query
52 whether the GL can accommodate a texture of a given configuration. If
53 the texture cannot be accommodated, the texture state variables, which
54 may be queried with glGetTexLevelParameter, are set to 0. If the tex‐
55 ture can be accommodated, the texture state values will be set as they
56 would be set for a non-proxy target.
57
58 pname specifies the texture parameter whose value or values will be
59 returned.
60
61 The accepted parameter names are as follows:
62
63 GL_TEXTURE_WIDTH
64 params returns a single value, the width of the texture
65 image. This value includes the border of the texture image.
66 The initial value is 0.
67
68 GL_TEXTURE_HEIGHT
69 params returns a single value, the height of the texture
70 image. This value includes the border of the texture image.
71 The initial value is 0.
72
73 GL_TEXTURE_DEPTH
74 params returns a single value, the depth of the texture
75 image. This value includes the border of the texture image.
76 The initial value is 0.
77
78 GL_TEXTURE_INTERNAL_FORMAT
79 params returns a single value, the internal of the texture
80 image.
81
82 GL_TEXTURE_BORDER
83 params returns a single value, the width in pixels of the
84 border of the texture image. The initial value is 0.
85
86 GL_TEXTURE_RED_SIZE,
87
88 GL_TEXTURE_GREEN_SIZE,
89
90 GL_TEXTURE_BLUE_SIZE,
91
92 GL_TEXTURE_ALPHA_SIZE,
93
94 GL_TEXTURE_LUMINANCE_SIZE,
95
96 GL_TEXTURE_INTENSITY_SIZE
97 The internal storage resolution of an individual component.
98 The resolution chosen by the GL will be a close match for the
99 resolution requested by the user with the component argument
100 of glTexImage1D, glTexImage2D, glTexImage3D,
101 glCopyTexImage1D, and glCopyTexImage2D. The initial value is
102 0.
103
105 If an error is generated, no change is made to the contents of params.
106
107 GL_TEXTURE_INTERNAL_FORMAT is available only if the GL version is 1.1
108 or greater. In version 1.0, use GL_TEXTURE_COMPONENTS instead.
109
110 GL_PROXY_TEXTURE_1D and GL_PROXY_TEXTURE_2D are available only if the
111 GL version is 1.1 or greater.
112
113 GL_TEXTURE_3D, GL_PROXY_TEXTURE_3D, and GL_TEXTURE_DEPTH are available
114 only if the GL version is 1.2 or greater.
115
116 When the GL_ARB_multitexture extension is supported,
117 glGetTexLevelParameter returns the texture level parameters for the
118 active texture unit.
119
121 GL_INVALID_ENUM is generated if target or pname is not an accepted
122 value.
123
124 GL_INVALID_VALUE is generated if level is less than 0.
125
126 GL_INVALID_VALUE may be generated if level is greater than log2 max,
127 where max is the returned value of GL_MAX_TEXTURE_SIZE.
128
129 GL_INVALID_OPERATION is generated if glGetTexLevelParameter is executed
130 between the execution of glBegin and the corresponding execution of
131 glEnd.
132
134 glActiveTextureARB(3G), glGetTexParameter(3G), glCopyTexImage1D(3G),
135 glCopyTexImage2D(3G), glCopyTexSubImage1D(3G), glCopyTexSubImage2D(3G),
136 glCopyTexSubImage3D(3G), glTexEnv(3G), glTexGen(3G), glTexImage1D(3G),
137 glTexImage2D(3G), glTexImage3D(3G), glTexSubImage1D(3G),
138 glTexSubImage2D(3G), glTexSubImage3D(3G), glTexParameter(3G)
139
140
141
142 GLGETTEXLEVELPARAMETER(3G)