Commit | Line | Data |
---|---|---|
7faf1d71 AW |
1 | <?xml version="1.0" encoding="UTF-8"?> |
2 | <!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook MathML Module V1.1b1//EN" | |
3 | "http://www.oasis-open.org/docbook/xml/mathml/1.1CR1/dbmathml.dtd"> | |
4 | <refentry id="glGetTexParameter"> | |
5 | <refmeta> | |
6 | <refmetainfo> | |
7 | <copyright> | |
8 | <year>1991-2006</year> | |
9 | <holder>Silicon Graphics, Inc.</holder> | |
10 | </copyright> | |
11 | </refmetainfo> | |
12 | <refentrytitle>glGetTexParameter</refentrytitle> | |
13 | <manvolnum>3G</manvolnum> | |
14 | </refmeta> | |
15 | <refnamediv> | |
16 | <refname>glGetTexParameter</refname> | |
17 | <refpurpose>return texture parameter values</refpurpose> | |
18 | </refnamediv> | |
19 | <refsynopsisdiv><title>C Specification</title> | |
20 | <funcsynopsis> | |
21 | <funcprototype> | |
22 | <funcdef>void <function>glGetTexParameterfv</function></funcdef> | |
23 | <paramdef>GLenum <parameter>target</parameter></paramdef> | |
24 | <paramdef>GLenum <parameter>pname</parameter></paramdef> | |
25 | <paramdef>GLfloat * <parameter>params</parameter></paramdef> | |
26 | </funcprototype> | |
27 | </funcsynopsis> | |
28 | <funcsynopsis> | |
29 | <funcprototype> | |
30 | <funcdef>void <function>glGetTexParameteriv</function></funcdef> | |
31 | <paramdef>GLenum <parameter>target</parameter></paramdef> | |
32 | <paramdef>GLenum <parameter>pname</parameter></paramdef> | |
33 | <paramdef>GLint * <parameter>params</parameter></paramdef> | |
34 | </funcprototype> | |
35 | </funcsynopsis> | |
36 | <funcsynopsis> | |
37 | <funcprototype> | |
38 | <funcdef>void <function>glGetTexParameterIiv</function></funcdef> | |
39 | <paramdef>GLenum <parameter>target</parameter></paramdef> | |
40 | <paramdef>GLenum <parameter>pname</parameter></paramdef> | |
41 | <paramdef>GLint * <parameter>params</parameter></paramdef> | |
42 | </funcprototype> | |
43 | </funcsynopsis> | |
44 | <funcsynopsis> | |
45 | <funcprototype> | |
46 | <funcdef>void <function>glGetTexParameterIuiv</function></funcdef> | |
47 | <paramdef>GLenum <parameter>target</parameter></paramdef> | |
48 | <paramdef>GLenum <parameter>pname</parameter></paramdef> | |
49 | <paramdef>GLuint * <parameter>params</parameter></paramdef> | |
50 | </funcprototype> | |
51 | </funcsynopsis> | |
52 | </refsynopsisdiv> | |
53 | <!-- eqn: ignoring delim $$ --> | |
54 | <refsect1 id="parameters"><title>Parameters</title> | |
55 | <variablelist> | |
56 | <varlistentry> | |
57 | <term><parameter>target</parameter></term> | |
58 | <listitem> | |
59 | <para> | |
60 | Specifies the symbolic name of the target texture. | |
61 | <constant>GL_TEXTURE_1D</constant>, | |
62 | <constant>GL_TEXTURE_2D</constant>, | |
63 | <constant>GL_TEXTURE_1D_ARRAY</constant>, | |
64 | <constant>GL_TEXTURE_2D_ARRAY</constant>, | |
65 | <constant>GL_TEXTURE_3D</constant>, | |
66 | <constant>GL_TEXTURE_RECTANGLE</constant>, and | |
67 | <constant>GL_TEXTURE_CUBE_MAP</constant> | |
68 | are accepted. | |
69 | </para> | |
70 | </listitem> | |
71 | </varlistentry> | |
72 | <varlistentry> | |
73 | <term><parameter>pname</parameter></term> | |
74 | <listitem> | |
75 | <para> | |
76 | Specifies the symbolic name of a texture parameter. | |
77 | <constant>GL_TEXTURE_BASE_LEVEL</constant>, | |
78 | <constant>GL_TEXTURE_BORDER_COLOR</constant>, | |
79 | <constant>GL_TEXTURE_COMPARE_MODE</constant>, | |
80 | <constant>GL_TEXTURE_COMPARE_FUNC</constant>, | |
81 | <constant>GL_TEXTURE_LOD_BIAS</constant>, | |
82 | <constant>GL_TEXTURE_MAG_FILTER</constant>, | |
83 | <constant>GL_TEXTURE_MAX_LEVEL</constant>, | |
84 | <constant>GL_TEXTURE_MAX_LOD</constant>, | |
85 | <constant>GL_TEXTURE_MIN_FILTER</constant>, | |
86 | <constant>GL_TEXTURE_MIN_LOD</constant>, | |
87 | <constant>GL_TEXTURE_SWIZZLE_R</constant>, | |
88 | <constant>GL_TEXTURE_SWIZZLE_G</constant>, | |
89 | <constant>GL_TEXTURE_SWIZZLE_B</constant>, | |
90 | <constant>GL_TEXTURE_SWIZZLE_A</constant>, | |
91 | <constant>GL_TEXTURE_SWIZZLE_RGBA</constant>, | |
92 | <constant>GL_TEXTURE_WRAP_S</constant>, | |
93 | <constant>GL_TEXTURE_WRAP_T</constant>, and | |
94 | <constant>GL_TEXTURE_WRAP_R</constant> | |
95 | are accepted. | |
96 | </para> | |
97 | </listitem> | |
98 | </varlistentry> | |
99 | <varlistentry> | |
100 | <term><parameter>params</parameter></term> | |
101 | <listitem> | |
102 | <para> | |
103 | Returns the texture parameters. | |
104 | </para> | |
105 | </listitem> | |
106 | </varlistentry> | |
107 | </variablelist> | |
108 | </refsect1> | |
109 | <refsect1 id="description"><title>Description</title> | |
110 | <para> | |
111 | <function>glGetTexParameter</function> returns in <parameter>params</parameter> the value or values of the texture parameter | |
112 | specified as <parameter>pname</parameter>. | |
113 | <parameter>target</parameter> defines the target texture. | |
114 | <constant>GL_TEXTURE_1D</constant>, | |
115 | <constant>GL_TEXTURE_2D</constant>, | |
116 | <constant>GL_TEXTURE_3D</constant>, | |
117 | <constant>GL_TEXTURE_1D_ARRAY</constant>, | |
118 | <constant>GL_TEXTURE_2D_ARRAY</constant>, | |
119 | <constant>GL_TEXTURE_RECTANGLE</constant>, and | |
120 | <constant>GL_TEXTURE_CUBE_MAP</constant> | |
121 | specify one-, two-, or three-dimensional, one-dimensional array, two-dimensional array, rectangle or cube-mapped texturing, respectively. | |
122 | <parameter>pname</parameter> accepts the same symbols as <citerefentry><refentrytitle>glTexParameter</refentrytitle></citerefentry>, | |
123 | with the same interpretations: | |
124 | </para> | |
125 | <variablelist> | |
126 | <varlistentry> | |
127 | <term><constant>GL_TEXTURE_MAG_FILTER</constant></term> | |
128 | <listitem> | |
129 | <para> | |
130 | Returns the single-valued texture magnification filter, | |
131 | a symbolic constant. The initial value is <constant>GL_LINEAR</constant>. | |
132 | </para> | |
133 | </listitem> | |
134 | </varlistentry> | |
135 | <varlistentry> | |
136 | <term><constant>GL_TEXTURE_MIN_FILTER</constant></term> | |
137 | <listitem> | |
138 | <para> | |
139 | Returns the single-valued texture minification filter, | |
140 | a symbolic constant. The initial value is <constant>GL_NEAREST_MIPMAP_LINEAR</constant>. | |
141 | </para> | |
142 | </listitem> | |
143 | </varlistentry> | |
144 | <varlistentry> | |
145 | <term><constant>GL_TEXTURE_MIN_LOD</constant></term> | |
146 | <listitem> | |
147 | <para> | |
148 | Returns the single-valued texture minimum level-of-detail value. The | |
149 | initial value is | |
150 | <inlineequation><mml:math> | |
151 | <!-- eqn: -1000: --> | |
152 | <mml:mn>-1000</mml:mn> | |
153 | </mml:math></inlineequation>. | |
154 | </para> | |
155 | </listitem> | |
156 | </varlistentry> | |
157 | <varlistentry> | |
158 | <term><constant>GL_TEXTURE_MAX_LOD</constant></term> | |
159 | <listitem> | |
160 | <para> | |
161 | Returns the single-valued texture maximum level-of-detail value. The | |
162 | initial value is 1000. | |
163 | </para> | |
164 | </listitem> | |
165 | </varlistentry> | |
166 | <varlistentry> | |
167 | <term><constant>GL_TEXTURE_BASE_LEVEL</constant></term> | |
168 | <listitem> | |
169 | <para> | |
170 | Returns the single-valued base texture mipmap level. The initial value is 0. | |
171 | </para> | |
172 | </listitem> | |
173 | </varlistentry> | |
174 | <varlistentry> | |
175 | <term><constant>GL_TEXTURE_MAX_LEVEL</constant></term> | |
176 | <listitem> | |
177 | <para> | |
178 | Returns the single-valued maximum texture mipmap array level. The initial | |
179 | value is 1000. | |
180 | </para> | |
181 | </listitem> | |
182 | </varlistentry> | |
183 | <varlistentry> | |
184 | <term><constant>GL_TEXTURE_SWIZZLE_R</constant></term> | |
185 | <listitem> | |
186 | <para> | |
187 | Returns the red component swizzle. The initial value is <constant>GL_RED</constant>. | |
188 | </para> | |
189 | </listitem> | |
190 | </varlistentry> | |
191 | <varlistentry> | |
192 | <term><constant>GL_TEXTURE_SWIZZLE_G</constant></term> | |
193 | <listitem> | |
194 | <para> | |
195 | Returns the green component swizzle. The initial value is <constant>GL_GREEN</constant>. | |
196 | </para> | |
197 | </listitem> | |
198 | </varlistentry> | |
199 | <varlistentry> | |
200 | <term><constant>GL_TEXTURE_SWIZZLE_B</constant></term> | |
201 | <listitem> | |
202 | <para> | |
203 | Returns the blue component swizzle. The initial value is <constant>GL_BLUE</constant>. | |
204 | </para> | |
205 | </listitem> | |
206 | </varlistentry> | |
207 | <varlistentry> | |
208 | <term><constant>GL_TEXTURE_SWIZZLE_A</constant></term> | |
209 | <listitem> | |
210 | <para> | |
211 | Returns the alpha component swizzle. The initial value is <constant>GL_ALPHA</constant>. | |
212 | </para> | |
213 | </listitem> | |
214 | </varlistentry> | |
215 | <varlistentry> | |
216 | <term><constant>GL_TEXTURE_SWIZZLE_RGBA</constant></term> | |
217 | <listitem> | |
218 | <para> | |
219 | Returns the component swizzle for all channels in a single query. | |
220 | </para> | |
221 | </listitem> | |
222 | </varlistentry> | |
223 | <varlistentry> | |
224 | <term><constant>GL_TEXTURE_WRAP_S</constant></term> | |
225 | <listitem> | |
226 | <para> | |
227 | Returns the single-valued wrapping function for texture coordinate | |
228 | <inlineequation><mml:math><mml:mi mathvariant="italic">s</mml:mi></mml:math></inlineequation>, | |
229 | a symbolic constant. The initial value is <constant>GL_REPEAT</constant>. | |
230 | </para> | |
231 | </listitem> | |
232 | </varlistentry> | |
233 | <varlistentry> | |
234 | <term><constant>GL_TEXTURE_WRAP_T</constant></term> | |
235 | <listitem> | |
236 | <para> | |
237 | Returns the single-valued wrapping function for texture coordinate | |
238 | <inlineequation><mml:math><mml:mi mathvariant="italic">t</mml:mi></mml:math></inlineequation>, | |
239 | a symbolic constant. The initial value is <constant>GL_REPEAT</constant>. | |
240 | </para> | |
241 | </listitem> | |
242 | </varlistentry> | |
243 | <varlistentry> | |
244 | <term><constant>GL_TEXTURE_WRAP_R</constant></term> | |
245 | <listitem> | |
246 | <para> | |
247 | Returns the single-valued wrapping function for texture coordinate | |
248 | <inlineequation><mml:math><mml:mi mathvariant="italic">r</mml:mi></mml:math></inlineequation>, | |
249 | a symbolic constant. The initial value is <constant>GL_REPEAT</constant>. | |
250 | </para> | |
251 | </listitem> | |
252 | </varlistentry> | |
253 | <varlistentry> | |
254 | <term><constant>GL_TEXTURE_BORDER_COLOR</constant></term> | |
255 | <listitem> | |
256 | <para> | |
257 | Returns four integer or floating-point numbers that comprise the RGBA color | |
258 | of the texture border. | |
259 | Floating-point values are returned in the range | |
260 | <inlineequation><mml:math> | |
261 | <!-- eqn: [0,1]: --> | |
262 | <mml:mfenced open="[" close="]"> | |
263 | <mml:mn>0</mml:mn> | |
264 | <mml:mn>1</mml:mn> | |
265 | </mml:mfenced> | |
266 | </mml:math></inlineequation>. | |
267 | Integer values are returned as a linear mapping of the internal floating-point | |
268 | representation such that 1.0 maps to the most positive representable | |
269 | integer and | |
270 | <inlineequation><mml:math> | |
271 | <!-- eqn: -1.0: --> | |
272 | <mml:mn>-1.0</mml:mn> | |
273 | </mml:math></inlineequation> | |
274 | maps to the most negative representable | |
275 | integer. The initial value is (0, 0, 0, 0). | |
276 | </para> | |
277 | </listitem> | |
278 | </varlistentry> | |
279 | <varlistentry> | |
280 | <term><constant>GL_TEXTURE_COMPARE_MODE</constant></term> | |
281 | <listitem> | |
282 | <para> | |
283 | Returns a single-valued texture comparison mode, a symbolic constant. The | |
284 | initial value is <constant>GL_NONE</constant>. See <citerefentry><refentrytitle>glTexParameter</refentrytitle></citerefentry>. | |
285 | </para> | |
286 | </listitem> | |
287 | </varlistentry> | |
288 | <varlistentry> | |
289 | <term><constant>GL_TEXTURE_COMPARE_FUNC</constant></term> | |
290 | <listitem> | |
291 | <para> | |
292 | Returns a single-valued texture comparison function, a symbolic constant. The | |
293 | initial value is <constant>GL_LEQUAL</constant>. See <citerefentry><refentrytitle>glTexParameter</refentrytitle></citerefentry>. | |
294 | </para> | |
295 | </listitem> | |
296 | </varlistentry> | |
297 | </variablelist> | |
298 | </refsect1> | |
299 | <refsect1 id="notes"><title>Notes</title> | |
300 | <para> | |
301 | If an error is generated, | |
302 | no change is made to the contents of <parameter>params</parameter>. | |
303 | </para> | |
304 | </refsect1> | |
305 | <refsect1 id="errors"><title>Errors</title> | |
306 | <para> | |
307 | <constant>GL_INVALID_ENUM</constant> is generated if <parameter>target</parameter> or <parameter>pname</parameter> is not an | |
308 | accepted value. | |
309 | </para> | |
310 | </refsect1> | |
311 | <refsect1 id="seealso"><title>See Also</title> | |
312 | <para> | |
313 | <citerefentry><refentrytitle>glTexParameter</refentrytitle></citerefentry> | |
314 | </para> | |
315 | </refsect1> | |
316 | <refsect1 id="Copyright"><title>Copyright</title> | |
317 | <para> | |
318 | Copyright <trademark class="copyright"></trademark> 1991-2006 | |
319 | Silicon Graphics, Inc. Copyright <trademark class="copyright"></trademark> 2010 | |
320 | Khronos Group. This document is licensed under the SGI | |
321 | Free Software B License. For details, see | |
322 | <ulink url="http://oss.sgi.com/projects/FreeB/">http://oss.sgi.com/projects/FreeB/</ulink>. | |
323 | </para> | |
324 | </refsect1> | |
325 | </refentry> |