rename upstream-man-pages to upstream-doc
[clinton/guile-figl.git] / upstream-doc / man3 / glSamplerParameter.xml
CommitLineData
7faf1d71
AW
1<?xml version="1.0" encoding="UTF-8"?>\r
2<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook MathML Module V1.1b1//EN"\r
3 "http://www.oasis-open.org/docbook/xml/mathml/1.1CR1/dbmathml.dtd">\r
4<refentry id="glSamplerParameter">\r
5 <refmeta>\r
6 <refmetainfo>\r
7 <copyright>\r
8 <year>2010</year>\r
9 <holder>KhronosGroup</holder>\r
10 </copyright>\r
11 </refmetainfo>\r
12 <refentrytitle>glSamplerParameter</refentrytitle>\r
13 <manvolnum>3G</manvolnum>\r
14 </refmeta>\r
15 <refnamediv>\r
16 <refname>glSamplerParameter</refname>\r
17 <refpurpose>set sampler parameters</refpurpose>\r
18 </refnamediv>\r
19 <refsynopsisdiv><title>C Specification</title>\r
20 <funcsynopsis>\r
21 <funcprototype>\r
22 <funcdef>void <function>glSamplerParameterf</function></funcdef>\r
23 <paramdef>GLuint <parameter>sampler</parameter></paramdef>\r
24 <paramdef>GLenum <parameter>pname</parameter></paramdef>\r
25 <paramdef>GLfloat <parameter>param</parameter></paramdef>\r
26 </funcprototype>\r
27 </funcsynopsis>\r
28 <funcsynopsis>\r
29 <funcprototype>\r
30 <funcdef>void <function>glSamplerParameteri</function></funcdef>\r
31 <paramdef>GLuint <parameter>sampler</parameter></paramdef>\r
32 <paramdef>GLenum <parameter>pname</parameter></paramdef>\r
33 <paramdef>GLint <parameter>param</parameter></paramdef>\r
34 </funcprototype>\r
35 </funcsynopsis>\r
36 </refsynopsisdiv>\r
37 <!-- eqn: ignoring delim $$ -->\r
38 <refsect1 id="parameters"><title>Parameters</title>\r
39 <variablelist>\r
40 <varlistentry>\r
41 <term><parameter>sampler</parameter></term>\r
42 <listitem>\r
43 <para>\r
44 Specifies the sampler object whose parameter to modify.\r
45 </para>\r
46 </listitem>\r
47 </varlistentry>\r
48 <varlistentry>\r
49 <term><parameter>pname</parameter></term>\r
50 <listitem>\r
51 <para>\r
52 Specifies the symbolic name of a single-valued sampler parameter.\r
53 <parameter>pname</parameter> can be one of the following:\r
54 <constant>GL_TEXTURE_WRAP_S</constant>,\r
55 <constant>GL_TEXTURE_WRAP_T</constant>,\r
56 <constant>GL_TEXTURE_WRAP_R</constant>,\r
57 <constant>GL_TEXTURE_MIN_FILTER</constant>,\r
58 <constant>GL_TEXTURE_MAG_FILTER</constant>,\r
59 <constant>GL_TEXTURE_MIN_LOD</constant>,\r
60 <constant>GL_TEXTURE_MAX_LOD</constant>,\r
61 <constant>GL_TEXTURE_LOD_BIAS</constant>\r
62 <constant>GL_TEXTURE_COMPARE_MODE</constant>, or\r
63 <constant>GL_TEXTURE_COMPARE_FUNC</constant>.\r
64 </para>\r
65 </listitem>\r
66 </varlistentry>\r
67 <varlistentry>\r
68 <term><parameter>param</parameter></term>\r
69 <listitem>\r
70 <para>\r
71 Specifies the value of <parameter>pname</parameter>.\r
72 </para>\r
73 </listitem>\r
74 </varlistentry>\r
75 </variablelist>\r
76 </refsect1>\r
77 <refsynopsisdiv><title>C Specification</title>\r
78 <funcsynopsis>\r
79 <funcprototype>\r
80 <funcdef>void <function>glSamplerParameterfv</function></funcdef>\r
81 <paramdef>GLuint <parameter>sampler</parameter></paramdef>\r
82 <paramdef>GLenum <parameter>pname</parameter></paramdef>\r
83 <paramdef>const GLfloat * <parameter>params</parameter></paramdef>\r
84 </funcprototype>\r
85 </funcsynopsis>\r
86 <funcsynopsis>\r
87 <funcprototype>\r
88 <funcdef>void <function>glSamplerParameteriv</function></funcdef>\r
89 <paramdef>GLuint <parameter>sampler</parameter></paramdef>\r
90 <paramdef>GLenum <parameter>pname</parameter></paramdef>\r
91 <paramdef>const GLint * <parameter>params</parameter></paramdef>\r
92 </funcprototype>\r
93 </funcsynopsis>\r
94 <funcsynopsis>\r
95 <funcprototype>\r
96 <funcdef>void <function>glSamplerParameterIiv</function></funcdef>\r
97 <paramdef>GLuint <parameter>sampler</parameter></paramdef>\r
98 <paramdef>GLenum <parameter>pname</parameter></paramdef>\r
99 <paramdef>const GLint * <parameter>params</parameter></paramdef>\r
100 </funcprototype>\r
101 </funcsynopsis>\r
102 <funcsynopsis>\r
103 <funcprototype>\r
104 <funcdef>void <function>glSamplerParameterIuiv</function></funcdef>\r
105 <paramdef>GLuint <parameter>sampler</parameter></paramdef>\r
106 <paramdef>GLenum <parameter>pname</parameter></paramdef>\r
107 <paramdef>const GLuint * <parameter>params</parameter></paramdef>\r
108 </funcprototype>\r
109 </funcsynopsis>\r
110 </refsynopsisdiv>\r
111 <refsect1 id="parameters2"><title>Parameters</title>\r
112 <variablelist>\r
113 <varlistentry>\r
114 <term><parameter>sampler</parameter></term>\r
115 <listitem>\r
116 <para>\r
117 Specifies the sampler object whose parameter to modify.\r
118 </para>\r
119 </listitem>\r
120 </varlistentry>\r
121 <varlistentry>\r
122 <term><parameter>pname</parameter></term>\r
123 <listitem>\r
124 <para>\r
125 Specifies the symbolic name of a sampler parameter.\r
126 <parameter>pname</parameter> can be one of the following:\r
127 <constant>GL_TEXTURE_WRAP_S</constant>,\r
128 <constant>GL_TEXTURE_WRAP_T</constant>,\r
129 <constant>GL_TEXTURE_WRAP_R</constant>,\r
130 <constant>GL_TEXTURE_MIN_FILTER</constant>,\r
131 <constant>GL_TEXTURE_MAG_FILTER</constant>,\r
132 <constant>GL_TEXTURE_BORDER_COLOR</constant>,\r
133 <constant>GL_TEXTURE_MIN_LOD</constant>,\r
134 <constant>GL_TEXTURE_MAX_LOD</constant>,\r
135 <constant>GL_TEXTURE_LOD_BIAS</constant>\r
136 <constant>GL_TEXTURE_COMPARE_MODE</constant>, or\r
137 <constant>GL_TEXTURE_COMPARE_FUNC</constant>.\r
138 </para>\r
139 </listitem>\r
140 </varlistentry>\r
141 <varlistentry>\r
142 <term><parameter>params</parameter></term>\r
143 <listitem>\r
144 <para>\r
145 Specifies a pointer to an array where the value or values of <parameter>pname</parameter>\r
146 are stored.\r
147 </para>\r
148 </listitem>\r
149 </varlistentry>\r
150 </variablelist>\r
151 </refsect1>\r
152 <refsect1 id="description"><title>Description</title>\r
153 <para>\r
154 <function>glSamplerParameter</function> assigns the value or values in <parameter>params</parameter> to the sampler parameter\r
155 specified as <parameter>pname</parameter>.\r
156 <parameter>sampler</parameter> specifies the sampler object to be modified, and must be the name of a sampler object previously\r
157 returned from a call to <citerefentry><refentrytitle>glGenSamplers</refentrytitle></citerefentry>.\r
158 The following symbols are accepted in <parameter>pname</parameter>:\r
159 </para>\r
160 <variablelist>\r
161 <varlistentry>\r
162 <term><constant>GL_TEXTURE_MIN_FILTER</constant></term>\r
163 <listitem>\r
164 <para>\r
165 The texture minifying function is used whenever the pixel being textured\r
166 maps to an area greater than one texture element.\r
167 There are six defined minifying functions.\r
168 Two of them use the nearest one or nearest four texture elements\r
169 to compute the texture value.\r
170 The other four use mipmaps.\r
171 </para>\r
172 <para>\r
173 A mipmap is an ordered set of arrays representing the same image\r
174 at progressively lower resolutions.\r
175 If the texture has dimensions \r
176 <inlineequation><mml:math>\r
177 <!-- eqn: 2 sup n times 2 sup m: -->\r
178 <mml:mrow>\r
179 <mml:msup><mml:mn>2</mml:mn>\r
180 <mml:mi mathvariant="italic">n</mml:mi>\r
181 </mml:msup>\r
182 <mml:mo>&times;</mml:mo>\r
183 <mml:msup><mml:mn>2</mml:mn>\r
184 <mml:mi mathvariant="italic">m</mml:mi>\r
185 </mml:msup>\r
186 </mml:mrow>\r
187 </mml:math></inlineequation>,\r
188 there are\r
189 <inlineequation><mml:math>\r
190 <!-- eqn: max ( n, m ) + 1: -->\r
191 <mml:mrow>\r
192 <mml:mrow>\r
193 <mml:mi mathvariant="italic">max</mml:mi>\r
194 <mml:mo>&af;</mml:mo>\r
195 <mml:mfenced open="(" close=")">\r
196 <mml:mi mathvariant="italic">n</mml:mi>\r
197 <mml:mi mathvariant="italic">m</mml:mi>\r
198 </mml:mfenced>\r
199 </mml:mrow>\r
200 <mml:mo>+</mml:mo>\r
201 <mml:mn>1</mml:mn>\r
202 </mml:mrow>\r
203 </mml:math></inlineequation>\r
204 mipmaps.\r
205 The first mipmap is the original texture,\r
206 with dimensions \r
207 <inlineequation><mml:math>\r
208 <!-- eqn: 2 sup n times 2 sup m: -->\r
209 <mml:mrow>\r
210 <mml:msup><mml:mn>2</mml:mn>\r
211 <mml:mi mathvariant="italic">n</mml:mi>\r
212 </mml:msup>\r
213 <mml:mo>&times;</mml:mo>\r
214 <mml:msup><mml:mn>2</mml:mn>\r
215 <mml:mi mathvariant="italic">m</mml:mi>\r
216 </mml:msup>\r
217 </mml:mrow>\r
218 </mml:math></inlineequation>.\r
219 Each subsequent mipmap has dimensions \r
220 <inlineequation><mml:math>\r
221 <!-- eqn: 2 sup { k - 1 } times 2 sup { l - 1 }: -->\r
222 <mml:mrow>\r
223 <mml:msup><mml:mn>2</mml:mn>\r
224 <mml:mfenced open="" close="">\r
225 <mml:mrow>\r
226 <mml:mi mathvariant="italic">k</mml:mi>\r
227 <mml:mo>-</mml:mo>\r
228 <mml:mn>1</mml:mn>\r
229 </mml:mrow>\r
230 </mml:mfenced>\r
231 </mml:msup>\r
232 <mml:mo>&times;</mml:mo>\r
233 <mml:msup><mml:mn>2</mml:mn>\r
234 <mml:mfenced open="" close="">\r
235 <mml:mrow>\r
236 <mml:mi mathvariant="italic">l</mml:mi>\r
237 <mml:mo>-</mml:mo>\r
238 <mml:mn>1</mml:mn>\r
239 </mml:mrow>\r
240 </mml:mfenced>\r
241 </mml:msup>\r
242 </mml:mrow>\r
243 </mml:math></inlineequation>,\r
244 where \r
245 <inlineequation><mml:math>\r
246 <!-- eqn: 2 sup k times 2 sup l: -->\r
247 <mml:mrow>\r
248 <mml:msup><mml:mn>2</mml:mn>\r
249 <mml:mi mathvariant="italic">k</mml:mi>\r
250 </mml:msup>\r
251 <mml:mo>&times;</mml:mo>\r
252 <mml:msup><mml:mn>2</mml:mn>\r
253 <mml:mi mathvariant="italic">l</mml:mi>\r
254 </mml:msup>\r
255 </mml:mrow>\r
256 </mml:math></inlineequation>\r
257 are the dimensions of the previous mipmap,\r
258 until either \r
259 <inlineequation><mml:math>\r
260 <!-- eqn: k = 0: -->\r
261 <mml:mrow>\r
262 <mml:mi mathvariant="italic">k</mml:mi>\r
263 <mml:mo>=</mml:mo>\r
264 <mml:mn>0</mml:mn>\r
265 </mml:mrow>\r
266 </mml:math></inlineequation>\r
267 or \r
268 <inlineequation><mml:math>\r
269 <!-- eqn: l = 0: -->\r
270 <mml:mrow>\r
271 <mml:mi mathvariant="italic">l</mml:mi>\r
272 <mml:mo>=</mml:mo>\r
273 <mml:mn>0</mml:mn>\r
274 </mml:mrow>\r
275 </mml:math></inlineequation>.\r
276 At that point,\r
277 subsequent mipmaps have dimension \r
278 <inlineequation><mml:math>\r
279 <!-- eqn: 1 times 2 sup { l - 1 }: -->\r
280 <mml:mrow>\r
281 <mml:mn>1</mml:mn>\r
282 <mml:mo>&times;</mml:mo>\r
283 <mml:msup><mml:mn>2</mml:mn>\r
284 <mml:mfenced open="" close="">\r
285 <mml:mrow>\r
286 <mml:mi mathvariant="italic">l</mml:mi>\r
287 <mml:mo>-</mml:mo>\r
288 <mml:mn>1</mml:mn>\r
289 </mml:mrow>\r
290 </mml:mfenced>\r
291 </mml:msup>\r
292 </mml:mrow>\r
293 </mml:math></inlineequation>\r
294 or \r
295 <inlineequation><mml:math>\r
296 <!-- eqn: 2 sup { k - 1} times 1: -->\r
297 <mml:mrow>\r
298 <mml:msup><mml:mn>2</mml:mn>\r
299 <mml:mfenced open="" close="">\r
300 <mml:mrow>\r
301 <mml:mi mathvariant="italic">k</mml:mi>\r
302 <mml:mo>-</mml:mo>\r
303 <mml:mn>1</mml:mn>\r
304 </mml:mrow>\r
305 </mml:mfenced>\r
306 </mml:msup>\r
307 <mml:mo>&times;</mml:mo>\r
308 <mml:mn>1</mml:mn>\r
309 </mml:mrow>\r
310 </mml:math></inlineequation>\r
311 until the final mipmap,\r
312 which has dimension \r
313 <inlineequation><mml:math>\r
314 <!-- eqn: 1 times 1: -->\r
315 <mml:mrow>\r
316 <mml:mn>1</mml:mn>\r
317 <mml:mo>&times;</mml:mo>\r
318 <mml:mn>1</mml:mn>\r
319 </mml:mrow>\r
320 </mml:math></inlineequation>.\r
321 To define the mipmaps, call <citerefentry><refentrytitle>glTexImage1D</refentrytitle></citerefentry>, <citerefentry><refentrytitle>glTexImage2D</refentrytitle></citerefentry>,\r
322 <citerefentry><refentrytitle>glTexImage3D</refentrytitle></citerefentry>,\r
323 <citerefentry><refentrytitle>glCopyTexImage1D</refentrytitle></citerefentry>, or <citerefentry><refentrytitle>glCopyTexImage2D</refentrytitle></citerefentry>\r
324 with the <emphasis>level</emphasis> argument indicating the order of the mipmaps.\r
325 Level 0 is the original texture;\r
326 level \r
327 <inlineequation><mml:math>\r
328 <!-- eqn: max ( n, m ): -->\r
329 <mml:mrow>\r
330 <mml:mi mathvariant="italic">max</mml:mi>\r
331 <mml:mo>&af;</mml:mo>\r
332 <mml:mfenced open="(" close=")">\r
333 <mml:mi mathvariant="italic">n</mml:mi>\r
334 <mml:mi mathvariant="italic">m</mml:mi>\r
335 </mml:mfenced>\r
336 </mml:mrow>\r
337 </mml:math></inlineequation>\r
338 is the final \r
339 <inlineequation><mml:math>\r
340 <!-- eqn: 1 times 1: -->\r
341 <mml:mrow>\r
342 <mml:mn>1</mml:mn>\r
343 <mml:mo>&times;</mml:mo>\r
344 <mml:mn>1</mml:mn>\r
345 </mml:mrow>\r
346 </mml:math></inlineequation>\r
347 mipmap.\r
348 </para>\r
349 <para>\r
350 <parameter>params</parameter> supplies a function for minifying the texture as one of the\r
351 following:\r
352 <variablelist>\r
353 <varlistentry>\r
354 <term><constant>GL_NEAREST</constant></term>\r
355 <listitem>\r
356 <para>\r
357 Returns the value of the texture element that is nearest\r
358 (in Manhattan distance)\r
359 to the center of the pixel being textured.\r
360 </para>\r
361 </listitem>\r
362 </varlistentry>\r
363 <varlistentry>\r
364 <term><constant>GL_LINEAR</constant></term>\r
365 <listitem>\r
366 <para>\r
367 Returns the weighted average of the four texture elements\r
368 that are closest to the center of the pixel being textured.\r
369 These can include border texture elements,\r
370 depending on the values of <constant>GL_TEXTURE_WRAP_S</constant> and <constant>GL_TEXTURE_WRAP_T</constant>,\r
371 and on the exact mapping.\r
372 </para>\r
373 </listitem>\r
374 </varlistentry>\r
375 <varlistentry>\r
376 <term><constant>GL_NEAREST_MIPMAP_NEAREST</constant></term>\r
377 <listitem>\r
378 <para>\r
379 Chooses the mipmap that most closely matches the size of the pixel\r
380 being textured and uses the <constant>GL_NEAREST</constant> criterion\r
381 (the texture element nearest to the center of the pixel)\r
382 to produce a texture value.\r
383 </para>\r
384 </listitem>\r
385 </varlistentry>\r
386 <varlistentry>\r
387 <term><constant>GL_LINEAR_MIPMAP_NEAREST</constant></term>\r
388 <listitem>\r
389 <para>\r
390 Chooses the mipmap that most closely matches the size of the pixel\r
391 being textured and uses the <constant>GL_LINEAR</constant> criterion\r
392 (a weighted average of the four texture elements that are closest\r
393 to the center of the pixel)\r
394 to produce a texture value.\r
395 </para>\r
396 </listitem>\r
397 </varlistentry>\r
398 <varlistentry>\r
399 <term><constant>GL_NEAREST_MIPMAP_LINEAR</constant></term>\r
400 <listitem>\r
401 <para>\r
402 Chooses the two mipmaps that most closely match the size of the pixel\r
403 being textured and uses the <constant>GL_NEAREST</constant> criterion\r
404 (the texture element nearest to the center of the pixel)\r
405 to produce a texture value from each mipmap.\r
406 The final texture value is a weighted average of those two values.\r
407 </para>\r
408 </listitem>\r
409 </varlistentry>\r
410 <varlistentry>\r
411 <term><constant>GL_LINEAR_MIPMAP_LINEAR</constant></term>\r
412 <listitem>\r
413 <para>\r
414 Chooses the two mipmaps that most closely match the size of the pixel\r
415 being textured and uses the <constant>GL_LINEAR</constant> criterion\r
416 (a weighted average of the four texture elements that are closest\r
417 to the center of the pixel)\r
418 to produce a texture value from each mipmap.\r
419 The final texture value is a weighted average of those two values.\r
420 </para>\r
421 </listitem>\r
422 </varlistentry>\r
423 </variablelist>\r
424 </para>\r
425 <para>\r
426 As more texture elements are sampled in the minification process,\r
427 fewer aliasing artifacts will be apparent.\r
428 While the <constant>GL_NEAREST</constant> and <constant>GL_LINEAR</constant> minification functions can be\r
429 faster than the other four,\r
430 they sample only one or four texture elements to determine the texture value\r
431 of the pixel being rendered and can produce moire patterns\r
432 or ragged transitions.\r
433 The initial value of <constant>GL_TEXTURE_MIN_FILTER</constant> is\r
434 <constant>GL_NEAREST_MIPMAP_LINEAR</constant>.\r
435 </para>\r
436 </listitem>\r
437 </varlistentry>\r
438 <varlistentry>\r
439 <term><constant>GL_TEXTURE_MAG_FILTER</constant></term>\r
440 <listitem>\r
441 <para>\r
442 The texture magnification function is used when the pixel being textured\r
443 maps to an area less than or equal to one texture element.\r
444 It sets the texture magnification function to either <constant>GL_NEAREST</constant>\r
445 or <constant>GL_LINEAR</constant> (see below). <constant>GL_NEAREST</constant> is generally faster\r
446 than <constant>GL_LINEAR</constant>,\r
447 but it can produce textured images with sharper edges\r
448 because the transition between texture elements is not as smooth.\r
449 The initial value of <constant>GL_TEXTURE_MAG_FILTER</constant> is <constant>GL_LINEAR</constant>.\r
450 <variablelist>\r
451 <varlistentry>\r
452 <term><constant>GL_NEAREST</constant></term>\r
453 <listitem>\r
454 <para>\r
455 Returns the value of the texture element that is nearest\r
456 (in Manhattan distance)\r
457 to the center of the pixel being textured.\r
458 </para>\r
459 </listitem>\r
460 </varlistentry>\r
461 <varlistentry>\r
462 <term><constant>GL_LINEAR</constant></term>\r
463 <listitem>\r
464 <para>\r
465 Returns the weighted average of the four texture elements\r
466 that are closest to the center of the pixel being textured.\r
467 These can include border texture elements,\r
468 depending on the values of <constant>GL_TEXTURE_WRAP_S</constant> and <constant>GL_TEXTURE_WRAP_T</constant>,\r
469 and on the exact mapping.\r
470 </para>\r
471 </listitem>\r
472 </varlistentry>\r
473 </variablelist>\r
474 <para>\r
475 </para>\r
476 </para>\r
477 </listitem>\r
478 </varlistentry>\r
479 </variablelist>\r
480 <para>\r
481 </para>\r
482 <variablelist>\r
483 <varlistentry>\r
484 <term><constant>GL_TEXTURE_MIN_LOD</constant></term>\r
485 <listitem>\r
486 <para>\r
487 Sets the minimum level-of-detail parameter. This floating-point value\r
488 limits the selection of highest resolution mipmap (lowest mipmap\r
489 level). The initial value is -1000.\r
490 </para>\r
491 </listitem>\r
492 </varlistentry>\r
493 </variablelist>\r
494 <para>\r
495 </para>\r
496 <variablelist>\r
497 <varlistentry>\r
498 <term><constant>GL_TEXTURE_MAX_LOD</constant></term>\r
499 <listitem>\r
500 <para>\r
501 Sets the maximum level-of-detail parameter. This floating-point value\r
502 limits the selection of the lowest resolution mipmap (highest mipmap\r
503 level). The initial value is 1000.\r
504 </para>\r
505 </listitem>\r
506 </varlistentry>\r
507 </variablelist>\r
508 <para>\r
509 </para>\r
510 <variablelist>\r
511 <varlistentry>\r
512 <term><constant>GL_TEXTURE_WRAP_S</constant></term>\r
513 <listitem>\r
514 <para>\r
515 Sets the wrap parameter for texture coordinate \r
516 <inlineequation><mml:math><mml:mi mathvariant="italic">s</mml:mi></mml:math></inlineequation>\r
517 to either <constant>GL_CLAMP_TO_EDGE</constant>, <constant>GL_MIRRORED_REPEAT</constant>, or\r
518 <constant>GL_REPEAT</constant>. <constant>GL_CLAMP_TO_BORDER</constant> causes the \r
519 <inlineequation><mml:math><mml:mi mathvariant="italic">s</mml:mi></mml:math></inlineequation>\r
520 coordinate to be clamped to the range\r
521 <inlineequation><mml:math>\r
522 <!-- eqn: left [ {-1 over 2N}, 1 + {1 over 2N} right ]: -->\r
523 <mml:mfenced open="[" close="]">\r
524 <mml:mfenced open="" close="">\r
525 <mml:mrow>\r
526 <mml:mfrac>\r
527 <mml:mn>-1</mml:mn>\r
528 <mml:mn>2<mml:mi mathvariant="italic">N</mml:mi></mml:mn>\r
529 </mml:mfrac>\r
530 </mml:mrow>\r
531 </mml:mfenced>\r
532 <mml:mrow>\r
533 <mml:mn>1</mml:mn>\r
534 <mml:mo>+</mml:mo>\r
535 <mml:mfenced open="" close="">\r
536 <mml:mrow>\r
537 <mml:mfrac>\r
538 <mml:mn>1</mml:mn>\r
539 <mml:mn>2<mml:mi mathvariant="italic">N</mml:mi></mml:mn>\r
540 </mml:mfrac>\r
541 </mml:mrow>\r
542 </mml:mfenced>\r
543 </mml:mrow>\r
544 </mml:mfenced>\r
545 </mml:math></inlineequation>,\r
546 where \r
547 <inlineequation><mml:math><mml:mi mathvariant="italic">N</mml:mi></mml:math></inlineequation>\r
548 is the size of the texture in the direction of\r
549 clamping.<constant>GL_CLAMP_TO_EDGE</constant> causes \r
550 <inlineequation><mml:math><mml:mi mathvariant="italic">s</mml:mi></mml:math></inlineequation>\r
551 coordinates to be clamped to the\r
552 range \r
553 <inlineequation><mml:math>\r
554 <!-- eqn: left [ {1 over 2N}, 1 - {1 over 2N} right ]: -->\r
555 <mml:mfenced open="[" close="]">\r
556 <mml:mfenced open="" close="">\r
557 <mml:mrow>\r
558 <mml:mfrac>\r
559 <mml:mn>1</mml:mn>\r
560 <mml:mn>2<mml:mi mathvariant="italic">N</mml:mi></mml:mn>\r
561 </mml:mfrac>\r
562 </mml:mrow>\r
563 </mml:mfenced>\r
564 <mml:mrow>\r
565 <mml:mn>1</mml:mn>\r
566 <mml:mo>-</mml:mo>\r
567 <mml:mfenced open="" close="">\r
568 <mml:mrow>\r
569 <mml:mfrac>\r
570 <mml:mn>1</mml:mn>\r
571 <mml:mn>2<mml:mi mathvariant="italic">N</mml:mi></mml:mn>\r
572 </mml:mfrac>\r
573 </mml:mrow>\r
574 </mml:mfenced>\r
575 </mml:mrow>\r
576 </mml:mfenced>\r
577 </mml:math></inlineequation>,\r
578 where \r
579 <inlineequation><mml:math><mml:mi mathvariant="italic">N</mml:mi></mml:math></inlineequation>\r
580 is the size\r
581 of the texture in the direction of clamping. <constant>GL_REPEAT</constant> causes the\r
582 integer part of the \r
583 <inlineequation><mml:math><mml:mi mathvariant="italic">s</mml:mi></mml:math></inlineequation>\r
584 coordinate to be ignored; the GL uses only the\r
585 fractional part, thereby creating a repeating pattern.\r
586 <constant>GL_MIRRORED_REPEAT</constant> causes the \r
587 <inlineequation><mml:math><mml:mi mathvariant="italic">s</mml:mi></mml:math></inlineequation>\r
588 coordinate to be set to the\r
589 fractional part of the texture coordinate if the integer part of \r
590 <inlineequation><mml:math><mml:mi mathvariant="italic">s</mml:mi></mml:math></inlineequation>\r
591 is\r
592 even; if the integer part of \r
593 <inlineequation><mml:math><mml:mi mathvariant="italic">s</mml:mi></mml:math></inlineequation>\r
594 is odd, then the \r
595 <inlineequation><mml:math><mml:mi mathvariant="italic">s</mml:mi></mml:math></inlineequation>\r
596 texture coordinate is\r
597 set to \r
598 <inlineequation><mml:math>\r
599 <!-- eqn: 1 - frac(s): -->\r
600 <mml:mrow>\r
601 <mml:mn>1</mml:mn>\r
602 <mml:mo>-</mml:mo>\r
603 <mml:mrow>\r
604 <mml:mi mathvariant="italic">frac</mml:mi>\r
605 <mml:mo>&af;</mml:mo>\r
606 <mml:mfenced open="(" close=")">\r
607 <mml:mi mathvariant="italic">s</mml:mi>\r
608 </mml:mfenced>\r
609 </mml:mrow>\r
610 </mml:mrow>\r
611 </mml:math></inlineequation>,\r
612 where \r
613 <inlineequation><mml:math>\r
614 <!-- eqn: frac(s): -->\r
615 <mml:mrow>\r
616 <mml:mi mathvariant="italic">frac</mml:mi>\r
617 <mml:mo>&af;</mml:mo>\r
618 <mml:mfenced open="(" close=")">\r
619 <mml:mi mathvariant="italic">s</mml:mi>\r
620 </mml:mfenced>\r
621 </mml:mrow>\r
622 </mml:math></inlineequation>\r
623 represents the fractional part of\r
624 <inlineequation><mml:math><mml:mi mathvariant="italic">s</mml:mi></mml:math></inlineequation>.\r
625 Initially, <constant>GL_TEXTURE_WRAP_S</constant> is set to <constant>GL_REPEAT</constant>.\r
626 </para>\r
627 </listitem>\r
628 </varlistentry>\r
629 </variablelist>\r
630 <para>\r
631 </para>\r
632 <variablelist>\r
633 <varlistentry>\r
634 <term><constant>GL_TEXTURE_WRAP_T</constant></term>\r
635 <listitem>\r
636 <para>\r
637 Sets the wrap parameter for texture coordinate \r
638 <inlineequation><mml:math><mml:mi mathvariant="italic">t</mml:mi></mml:math></inlineequation>\r
639 to either <constant>GL_CLAMP_TO_EDGE</constant>, <constant>GL_MIRRORED_REPEAT</constant>, or\r
640 <constant>GL_REPEAT</constant>. See the discussion under <constant>GL_TEXTURE_WRAP_S</constant>.\r
641 Initially, <constant>GL_TEXTURE_WRAP_T</constant> is set to <constant>GL_REPEAT</constant>.\r
642 </para>\r
643 </listitem>\r
644 </varlistentry>\r
645 <varlistentry>\r
646 <term><constant>GL_TEXTURE_WRAP_R</constant></term>\r
647 <listitem>\r
648 <para>\r
649 Sets the wrap parameter for texture coordinate \r
650 <inlineequation><mml:math><mml:mi mathvariant="italic">r</mml:mi></mml:math></inlineequation>\r
651 to either <constant>GL_CLAMP_TO_EDGE</constant>, <constant>GL_MIRRORED_REPEAT</constant>, or\r
652 <constant>GL_REPEAT</constant>. See the discussion under <constant>GL_TEXTURE_WRAP_S</constant>.\r
653 Initially, <constant>GL_TEXTURE_WRAP_R</constant> is set to <constant>GL_REPEAT</constant>.\r
654 </para>\r
655 </listitem>\r
656 </varlistentry>\r
657 <varlistentry>\r
658 <term><constant>GL_TEXTURE_BORDER_COLOR</constant></term>\r
659 <listitem>\r
660 <para>\r
661 The data in <parameter>params</parameter> specifies four values that define the border values that\r
662 should be used for border texels. If a texel is sampled from the border of the texture, the\r
663 values of <constant>GL_TEXTURE_BORDER_COLOR</constant> are interpreted as an RGBA color to match the\r
664 texture's internal format and substituted for the non-existent texel data. If the texture contains depth\r
665 components, the first component of <constant>GL_TEXTURE_BORDER_COLOR</constant> is interpreted as a depth value.\r
666 The initial value is\r
667 <inlineequation><mml:math>\r
668 <mml:mrow>\r
669 <mml:mfenced open="(" close=")">\r
670 <mml:mrow>\r
671 <mml:mn>0.0</mml:mn>, <mml:mn>0.0</mml:mn>, <mml:mn>0.0</mml:mn>, <mml:mn>0.0</mml:mn>\r
672 </mml:mrow>\r
673 </mml:mfenced>\r
674 </mml:mrow>\r
675 </mml:math></inlineequation>.\r
676 </para>\r
677 </listitem>\r
678 </varlistentry>\r
679 <varlistentry>\r
680 <term><constant>GL_TEXTURE_COMPARE_MODE</constant></term>\r
681 <listitem>\r
682 <para>\r
683 Specifies the texture comparison mode for currently bound textures.\r
684 That is, a texture whose internal format is <constant>GL_DEPTH_COMPONENT_*</constant>; see\r
685 <citerefentry><refentrytitle>glTexImage2D</refentrytitle></citerefentry>)\r
686 Permissible values are:\r
687 <variablelist>\r
688 <varlistentry>\r
689 <term><constant>GL_COMPARE_REF_TO_TEXTURE</constant></term>\r
690 <listitem>\r
691 <para>\r
692 Specifies that the interpolated and clamped \r
693 <inlineequation><mml:math><mml:mi mathvariant="italic">r</mml:mi></mml:math></inlineequation>\r
694 texture coordinate should\r
695 be compared to the value in the currently bound texture. See the\r
696 discussion of <constant>GL_TEXTURE_COMPARE_FUNC</constant> for details of how the comparison\r
697 is evaluated. The result of the comparison is assigned to the red channel.\r
698 </para>\r
699 </listitem>\r
700 </varlistentry>\r
701 <varlistentry>\r
702 <term><constant>GL_NONE</constant></term>\r
703 <listitem>\r
704 <para>\r
705 Specifies that the red channel should be assigned the\r
706 appropriate value from the currently bound texture.\r
707 </para>\r
708 </listitem>\r
709 </varlistentry>\r
710 </variablelist>\r
711 </para>\r
712 </listitem>\r
713 </varlistentry>\r
714 <varlistentry>\r
715 <term><constant>GL_TEXTURE_COMPARE_FUNC</constant></term>\r
716 <listitem>\r
717 <para>\r
718 Specifies the comparison operator used when <constant>GL_TEXTURE_COMPARE_MODE</constant> is\r
719 set to <constant>GL_COMPARE_REF_TO_TEXTURE</constant>. Permissible values are:\r
720 <informaltable frame="topbot">\r
721 <tgroup cols="2" align="left">\r
722 <colspec/>\r
723 <colspec/>\r
724 <thead>\r
725 <row>\r
726 <entry rowsep="1" align="left"><emphasis role="bold">\r
727 Texture Comparison Function\r
728 </emphasis></entry>\r
729 <entry rowsep="1" align="left"><emphasis role="bold">\r
730 Computed result \r
731 </emphasis></entry>\r
732 </row>\r
733 </thead>\r
734 <tbody>\r
735 <row>\r
736 <entry align="left">\r
737 <constant>GL_LEQUAL</constant>\r
738 </entry>\r
739 <entry align="left">\r
740 <informalequation><mml:math>\r
741 <!-- eqn: result = left { cpile {1.0 above 0.0} lpile {r <= {D sub t} above r > {D sub t}}: -->\r
742 <mml:mrow>\r
743 <mml:mi mathvariant="italic">result</mml:mi>\r
744 <mml:mo>=</mml:mo>\r
745 <mml:mfenced open="{" close="">\r
746 <mml:mrow>\r
747 <mml:mtable>\r
748 <mml:mtr><mml:mtd>\r
749 <mml:mn>1.0</mml:mn>\r
750 </mml:mtd></mml:mtr>\r
751 <mml:mtr><mml:mtd>\r
752 <mml:mn>0.0</mml:mn>\r
753 </mml:mtd></mml:mtr>\r
754 </mml:mtable>\r
755 <mml:mo>&it;&nbsp;&nbsp;</mml:mo>\r
756 <mml:mtable>\r
757 <mml:mtr><mml:mtd>\r
758 <mml:mrow>\r
759 <mml:mi mathvariant="italic">r</mml:mi>\r
760 <mml:mo>&lt;=</mml:mo>\r
761 <mml:mfenced open="" close="">\r
762 <mml:msub><mml:mi mathvariant="italic">D</mml:mi>\r
763 <mml:mi mathvariant="italic">t</mml:mi>\r
764 </mml:msub>\r
765 </mml:mfenced>\r
766 </mml:mrow>\r
767 </mml:mtd></mml:mtr>\r
768 <mml:mtr><mml:mtd>\r
769 <mml:mrow>\r
770 <mml:mi mathvariant="italic">r</mml:mi>\r
771 <mml:mo>&gt;</mml:mo>\r
772 <mml:mfenced open="" close="">\r
773 <mml:msub><mml:mi mathvariant="italic">D</mml:mi>\r
774 <mml:mi mathvariant="italic">t</mml:mi>\r
775 </mml:msub>\r
776 </mml:mfenced>\r
777 </mml:mrow>\r
778 </mml:mtd></mml:mtr>\r
779 </mml:mtable>\r
780 </mml:mrow>\r
781 </mml:mfenced>\r
782 </mml:mrow>\r
783 </mml:math></informalequation>\r
784 </entry>\r
785 </row>\r
786 <row>\r
787 <entry align="left">\r
788 <constant>GL_GEQUAL</constant>\r
789 </entry>\r
790 <entry align="left">\r
791 <informalequation><mml:math>\r
792 <!-- eqn: result = left { cpile {1.0 above 0.0} lpile {r <= {D sub t} above r > {D sub t}}: -->\r
793 <mml:mrow>\r
794 <mml:mi mathvariant="italic">result</mml:mi>\r
795 <mml:mo>=</mml:mo>\r
796 <mml:mfenced open="{" close="">\r
797 <mml:mrow>\r
798 <mml:mtable>\r
799 <mml:mtr><mml:mtd>\r
800 <mml:mn>1.0</mml:mn>\r
801 </mml:mtd></mml:mtr>\r
802 <mml:mtr><mml:mtd>\r
803 <mml:mn>0.0</mml:mn>\r
804 </mml:mtd></mml:mtr>\r
805 </mml:mtable>\r
806 <mml:mo>&it;&nbsp;&nbsp;</mml:mo>\r
807 <mml:mtable>\r
808 <mml:mtr><mml:mtd>\r
809 <mml:mrow>\r
810 <mml:mi mathvariant="italic">r</mml:mi>\r
811 <mml:mo>&gt;=</mml:mo>\r
812 <mml:mfenced open="" close="">\r
813 <mml:msub><mml:mi mathvariant="italic">D</mml:mi>\r
814 <mml:mi mathvariant="italic">t</mml:mi>\r
815 </mml:msub>\r
816 </mml:mfenced>\r
817 </mml:mrow>\r
818 </mml:mtd></mml:mtr>\r
819 <mml:mtr><mml:mtd>\r
820 <mml:mrow>\r
821 <mml:mi mathvariant="italic">r</mml:mi>\r
822 <mml:mo>&lt;</mml:mo>\r
823 <mml:mfenced open="" close="">\r
824 <mml:msub><mml:mi mathvariant="italic">D</mml:mi>\r
825 <mml:mi mathvariant="italic">t</mml:mi>\r
826 </mml:msub>\r
827 </mml:mfenced>\r
828 </mml:mrow>\r
829 </mml:mtd></mml:mtr>\r
830 </mml:mtable>\r
831 </mml:mrow>\r
832 </mml:mfenced>\r
833 </mml:mrow>\r
834 </mml:math></informalequation>\r
835 </entry>\r
836 </row>\r
837 <row>\r
838 <entry align="left">\r
839 <constant>GL_LESS</constant>\r
840 </entry>\r
841 <entry align="left">\r
842 <informalequation><mml:math>\r
843 <!-- eqn: result = left { cpile {1.0 above 0.0} lpile {r <= {D sub t} above r > {D sub t}}: -->\r
844 <mml:mrow>\r
845 <mml:mi mathvariant="italic">result</mml:mi>\r
846 <mml:mo>=</mml:mo>\r
847 <mml:mfenced open="{" close="">\r
848 <mml:mrow>\r
849 <mml:mtable>\r
850 <mml:mtr><mml:mtd>\r
851 <mml:mn>1.0</mml:mn>\r
852 </mml:mtd></mml:mtr>\r
853 <mml:mtr><mml:mtd>\r
854 <mml:mn>0.0</mml:mn>\r
855 </mml:mtd></mml:mtr>\r
856 </mml:mtable>\r
857 <mml:mo>&it;&nbsp;&nbsp;</mml:mo>\r
858 <mml:mtable>\r
859 <mml:mtr><mml:mtd>\r
860 <mml:mrow>\r
861 <mml:mi mathvariant="italic">r</mml:mi>\r
862 <mml:mo>&lt;</mml:mo>\r
863 <mml:mfenced open="" close="">\r
864 <mml:msub><mml:mi mathvariant="italic">D</mml:mi>\r
865 <mml:mi mathvariant="italic">t</mml:mi>\r
866 </mml:msub>\r
867 </mml:mfenced>\r
868 </mml:mrow>\r
869 </mml:mtd></mml:mtr>\r
870 <mml:mtr><mml:mtd>\r
871 <mml:mrow>\r
872 <mml:mi mathvariant="italic">r</mml:mi>\r
873 <mml:mo>&gt;=</mml:mo>\r
874 <mml:mfenced open="" close="">\r
875 <mml:msub><mml:mi mathvariant="italic">D</mml:mi>\r
876 <mml:mi mathvariant="italic">t</mml:mi>\r
877 </mml:msub>\r
878 </mml:mfenced>\r
879 </mml:mrow>\r
880 </mml:mtd></mml:mtr>\r
881 </mml:mtable>\r
882 </mml:mrow>\r
883 </mml:mfenced>\r
884 </mml:mrow>\r
885 </mml:math></informalequation>\r
886 </entry>\r
887 </row>\r
888 <row>\r
889 <entry align="left">\r
890 <constant>GL_GREATER</constant>\r
891 </entry>\r
892 <entry align="left">\r
893 <informalequation><mml:math>\r
894 <!-- eqn: result = left { cpile {1.0 above 0.0} lpile {r <= {D sub t} above r > {D sub t}}: -->\r
895 <mml:mrow>\r
896 <mml:mi mathvariant="italic">result</mml:mi>\r
897 <mml:mo>=</mml:mo>\r
898 <mml:mfenced open="{" close="">\r
899 <mml:mrow>\r
900 <mml:mtable>\r
901 <mml:mtr><mml:mtd>\r
902 <mml:mn>1.0</mml:mn>\r
903 </mml:mtd></mml:mtr>\r
904 <mml:mtr><mml:mtd>\r
905 <mml:mn>0.0</mml:mn>\r
906 </mml:mtd></mml:mtr>\r
907 </mml:mtable>\r
908 <mml:mo>&it;&nbsp;&nbsp;</mml:mo>\r
909 <mml:mtable>\r
910 <mml:mtr><mml:mtd>\r
911 <mml:mrow>\r
912 <mml:mi mathvariant="italic">r</mml:mi>\r
913 <mml:mo>&gt;</mml:mo>\r
914 <mml:mfenced open="" close="">\r
915 <mml:msub><mml:mi mathvariant="italic">D</mml:mi>\r
916 <mml:mi mathvariant="italic">t</mml:mi>\r
917 </mml:msub>\r
918 </mml:mfenced>\r
919 </mml:mrow>\r
920 </mml:mtd></mml:mtr>\r
921 <mml:mtr><mml:mtd>\r
922 <mml:mrow>\r
923 <mml:mi mathvariant="italic">r</mml:mi>\r
924 <mml:mo>&lt;=</mml:mo>\r
925 <mml:mfenced open="" close="">\r
926 <mml:msub><mml:mi mathvariant="italic">D</mml:mi>\r
927 <mml:mi mathvariant="italic">t</mml:mi>\r
928 </mml:msub>\r
929 </mml:mfenced>\r
930 </mml:mrow>\r
931 </mml:mtd></mml:mtr>\r
932 </mml:mtable>\r
933 </mml:mrow>\r
934 </mml:mfenced>\r
935 </mml:mrow>\r
936 </mml:math></informalequation>\r
937 </entry>\r
938 </row>\r
939 <row>\r
940 <entry align="left">\r
941 <constant>GL_EQUAL</constant>\r
942 </entry>\r
943 <entry align="left">\r
944 <informalequation><mml:math>\r
945 <!-- eqn: result = left { cpile {1.0 above 0.0} lpile {r <= {D sub t} above r > {D sub t}}: -->\r
946 <mml:mrow>\r
947 <mml:mi mathvariant="italic">result</mml:mi>\r
948 <mml:mo>=</mml:mo>\r
949 <mml:mfenced open="{" close="">\r
950 <mml:mrow>\r
951 <mml:mtable>\r
952 <mml:mtr><mml:mtd>\r
953 <mml:mn>1.0</mml:mn>\r
954 </mml:mtd></mml:mtr>\r
955 <mml:mtr><mml:mtd>\r
956 <mml:mn>0.0</mml:mn>\r
957 </mml:mtd></mml:mtr>\r
958 </mml:mtable>\r
959 <mml:mo>&it;&nbsp;&nbsp;</mml:mo>\r
960 <mml:mtable>\r
961 <mml:mtr><mml:mtd>\r
962 <mml:mrow>\r
963 <mml:mi mathvariant="italic">r</mml:mi>\r
964 <mml:mo>=</mml:mo>\r
965 <mml:mfenced open="" close="">\r
966 <mml:msub><mml:mi mathvariant="italic">D</mml:mi>\r
967 <mml:mi mathvariant="italic">t</mml:mi>\r
968 </mml:msub>\r
969 </mml:mfenced>\r
970 </mml:mrow>\r
971 </mml:mtd></mml:mtr>\r
972 <mml:mtr><mml:mtd>\r
973 <mml:mrow>\r
974 <mml:mi mathvariant="italic">r</mml:mi>\r
975 <mml:mo>&ne;</mml:mo>\r
976 <mml:mfenced open="" close="">\r
977 <mml:msub><mml:mi mathvariant="italic">D</mml:mi>\r
978 <mml:mi mathvariant="italic">t</mml:mi>\r
979 </mml:msub>\r
980 </mml:mfenced>\r
981 </mml:mrow>\r
982 </mml:mtd></mml:mtr>\r
983 </mml:mtable>\r
984 </mml:mrow>\r
985 </mml:mfenced>\r
986 </mml:mrow>\r
987 </mml:math></informalequation>\r
988 </entry>\r
989 </row>\r
990 <row>\r
991 <entry align="left">\r
992 <constant>GL_NOTEQUAL</constant>\r
993 </entry>\r
994 <entry align="left">\r
995 <informalequation><mml:math>\r
996 <!-- eqn: result = left { cpile {1.0 above 0.0} lpile {r <= {D sub t} above r > {D sub t}}: -->\r
997 <mml:mrow>\r
998 <mml:mi mathvariant="italic">result</mml:mi>\r
999 <mml:mo>=</mml:mo>\r
1000 <mml:mfenced open="{" close="">\r
1001 <mml:mrow>\r
1002 <mml:mtable>\r
1003 <mml:mtr><mml:mtd>\r
1004 <mml:mn>1.0</mml:mn>\r
1005 </mml:mtd></mml:mtr>\r
1006 <mml:mtr><mml:mtd>\r
1007 <mml:mn>0.0</mml:mn>\r
1008 </mml:mtd></mml:mtr>\r
1009 </mml:mtable>\r
1010 <mml:mo>&it;&nbsp;&nbsp;</mml:mo>\r
1011 <mml:mtable>\r
1012 <mml:mtr><mml:mtd>\r
1013 <mml:mrow>\r
1014 <mml:mi mathvariant="italic">r</mml:mi>\r
1015 <mml:mo>&ne;</mml:mo>\r
1016 <mml:mfenced open="" close="">\r
1017 <mml:msub><mml:mi mathvariant="italic">D</mml:mi>\r
1018 <mml:mi mathvariant="italic">t</mml:mi>\r
1019 </mml:msub>\r
1020 </mml:mfenced>\r
1021 </mml:mrow>\r
1022 </mml:mtd></mml:mtr>\r
1023 <mml:mtr><mml:mtd>\r
1024 <mml:mrow>\r
1025 <mml:mi mathvariant="italic">r</mml:mi>\r
1026 <mml:mo>=</mml:mo>\r
1027 <mml:mfenced open="" close="">\r
1028 <mml:msub><mml:mi mathvariant="italic">D</mml:mi>\r
1029 <mml:mi mathvariant="italic">t</mml:mi>\r
1030 </mml:msub>\r
1031 </mml:mfenced>\r
1032 </mml:mrow>\r
1033 </mml:mtd></mml:mtr>\r
1034 </mml:mtable>\r
1035 </mml:mrow>\r
1036 </mml:mfenced>\r
1037 </mml:mrow>\r
1038 </mml:math></informalequation>\r
1039 </entry>\r
1040 </row>\r
1041 <row>\r
1042 <entry align="left">\r
1043 <constant>GL_ALWAYS</constant>\r
1044 </entry>\r
1045 <entry align="left">\r
1046 <informalequation>\r
1047 <mml:math>\r
1048 <mml:mrow>\r
1049 <mml:mi mathvariant="italic">result</mml:mi>\r
1050 <mml:mo>=</mml:mo>\r
1051 <mml:mi>1.0</mml:mi>\r
1052 </mml:mrow>\r
1053 </mml:math>\r
1054 </informalequation>\r
1055 </entry>\r
1056 </row>\r
1057 <row>\r
1058 <entry align="left">\r
1059 <constant>GL_NEVER</constant>\r
1060 </entry>\r
1061 <entry align="left">\r
1062 <informalequation>\r
1063 <mml:math>\r
1064 <mml:mrow>\r
1065 <mml:mi mathvariant="italic">result</mml:mi>\r
1066 <mml:mo>=</mml:mo>\r
1067 <mml:mi>0.0</mml:mi>\r
1068 </mml:mrow>\r
1069 </mml:math>\r
1070 </informalequation>\r
1071 </entry>\r
1072 </row>\r
1073 </tbody>\r
1074 </tgroup>\r
1075 </informaltable>\r
1076 where <inlineequation><mml:math><mml:mi mathvariant="italic">r</mml:mi></mml:math></inlineequation>\r
1077 is the current interpolated texture coordinate, and \r
1078 <inlineequation><mml:math>\r
1079 <!-- eqn: D sub t: -->\r
1080 <mml:msub><mml:mi mathvariant="italic">D</mml:mi>\r
1081 <mml:mi mathvariant="italic">t</mml:mi>\r
1082 </mml:msub>\r
1083 </mml:math></inlineequation>\r
1084 is the texture value sampled from the currently bound texture.\r
1085 <inlineequation><mml:math><mml:mi mathvariant="italic">result</mml:mi></mml:math></inlineequation>\r
1086 is assigned to\r
1087 <inlineequation><mml:math>\r
1088 <!-- eqn: R sub t: -->\r
1089 <mml:msub><mml:mi mathvariant="italic">R</mml:mi>\r
1090 <mml:mi mathvariant="italic">t</mml:mi>\r
1091 </mml:msub>\r
1092 </mml:math></inlineequation>.\r
1093 </para>\r
1094 </listitem>\r
1095 </varlistentry>\r
1096 </variablelist>\r
1097 </refsect1>\r
1098 <refsect1 id="notes"><title>Notes</title>\r
1099 <para>\r
1100 <function>glSamplerParameter</function> is available only if the GL version is 3.3 or higher.\r
1101 </para>\r
1102 <para>\r
1103 If a sampler object is bound to a texture unit and that unit is used to sample from a texture, the parameters in the sampler\r
1104 are used to sample from the texture, rather than the equivalent parameters in the texture object bound to that unit. This\r
1105 introduces the possibility of sampling from the same texture object with different sets of sampler state, which may lead to\r
1106 a condition where a texture is <emphasis>incomplete</emphasis> with respect to one sampler object and not with respect to\r
1107 another. Thus, completeness can be considered a function of a sampler object and a texture object bound to a single\r
1108 texture unit, rather than a property of the texture object itself.\r
1109 </para>\r
1110 </refsect1>\r
1111 <refsect1 id="errors"><title>Errors</title>\r
1112 <para>\r
1113 <constant>GL_INVALID_VALUE</constant> is generated if <parameter>sampler</parameter> is not the name of a sampler object previously\r
1114 returned from a call to <citerefentry><refentrytitle>glGenSamplers</refentrytitle></citerefentry>.\r
1115 </para>\r
1116 <para>\r
1117 <constant>GL_INVALID_ENUM</constant> is generated if <parameter>params</parameter> should have a defined\r
1118 constant value (based on the value of <parameter>pname</parameter>) and does not.\r
1119 </para>\r
1120 </refsect1>\r
1121 <refsect1 id="associatedgets"><title>Associated Gets</title>\r
1122 <para>\r
1123 <citerefentry><refentrytitle>glGetSamplerParameter</refentrytitle></citerefentry>\r
1124 </para>\r
1125 </refsect1>\r
1126 <refsect1 id="seealso"><title>See Also</title>\r
1127 <para>\r
1128 <citerefentry><refentrytitle>glGenSamplers</refentrytitle></citerefentry>,\r
1129 <citerefentry><refentrytitle>glBindSampler</refentrytitle></citerefentry>,\r
1130 <citerefentry><refentrytitle>glDeleteSamplers</refentrytitle></citerefentry>,\r
1131 <citerefentry><refentrytitle>glIsSampler</refentrytitle></citerefentry>,\r
1132 <citerefentry><refentrytitle>glBindTexture</refentrytitle></citerefentry>,\r
1133 <citerefentry><refentrytitle>glTexParameter</refentrytitle></citerefentry>\r
1134 </para>\r
1135 </refsect1>\r
1136 <refsect1 id="Copyright"><title>Copyright</title>\r
1137 <para>\r
1138 Copyright <trademark class="copyright"></trademark> 2010 Khronos Group. \r
1139 This material may be distributed subject to the terms and conditions set forth in \r
1140 the Open Publication License, v 1.0, 8 June 1999.\r
1141 <ulink url="http://opencontent.org/openpub/">http://opencontent.org/openpub/</ulink>.\r
1142 </para>\r
1143 </refsect1>\r
1144</refentry>\r