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

NAME

6       glTexParameter - set texture parameters
7

C SPECIFICATION

9       void glTexParameterf(GLenum target, GLenum pname, GLfloat param);
10
11       void glTexParameteri(GLenum target, GLenum pname, GLint param);
12

PARAMETERS

14       target
15           Specifies the target texture, which must be either GL_TEXTURE_1D,
16           GL_TEXTURE_2D, GL_TEXTURE_3D, GL_TEXTURE_1D_ARRAY,
17           GL_TEXTURE_2D_ARRAY, GL_TEXTURE_RECTANGLE, or GL_TEXTURE_CUBE_MAP.
18
19       pname
20           Specifies the symbolic name of a single-valued texture parameter.
21           pname can be one of the following: GL_DEPTH_STENCIL_TEXTURE_MODE,
22           GL_TEXTURE_BASE_LEVEL, GL_TEXTURE_COMPARE_FUNC,
23           GL_TEXTURE_COMPARE_MODE, GL_TEXTURE_LOD_BIAS,
24           GL_TEXTURE_MIN_FILTER, GL_TEXTURE_MAG_FILTER, GL_TEXTURE_MIN_LOD,
25           GL_TEXTURE_MAX_LOD, GL_TEXTURE_MAX_LEVEL, GL_TEXTURE_SWIZZLE_R,
26           GL_TEXTURE_SWIZZLE_G, GL_TEXTURE_SWIZZLE_B, GL_TEXTURE_SWIZZLE_A,
27           GL_TEXTURE_WRAP_S, GL_TEXTURE_WRAP_T, or GL_TEXTURE_WRAP_R.
28
29       param
30           Specifies the value of pname.
31

C SPECIFICATION

33       void glTexParameterfv(GLenum target, GLenum pname,
34                             const GLfloat * params);
35
36       void glTexParameteriv(GLenum target, GLenum pname,
37                             const GLint * params);
38
39       void glTexParameterIiv(GLenum target, GLenum pname,
40                              const GLint * params);
41
42       void glTexParameterIuiv(GLenum target, GLenum pname,
43                               const GLuint * params);
44

PARAMETERS

46       target
47           Specifies the target texture, which must be either GL_TEXTURE_1D,
48           GL_TEXTURE_2D, GL_TEXTURE_3D, GL_TEXTURE_1D_ARRAY,
49           GL_TEXTURE_2D_ARRAY, GL_TEXTURE_RECTANGLE, or GL_TEXTURE_CUBE_MAP.
50
51       pname
52           Specifies the symbolic name of a texture parameter.  pname can be
53           one of the following: GL_DEPTH_STENCIL_TEXTURE_MODE,
54           GL_TEXTURE_BASE_LEVEL, GL_TEXTURE_BORDER_COLOR,
55           GL_TEXTURE_COMPARE_FUNC, GL_TEXTURE_COMPARE_MODE,
56           GL_TEXTURE_LOD_BIAS, GL_TEXTURE_MIN_FILTER, GL_TEXTURE_MAG_FILTER,
57           GL_TEXTURE_MIN_LOD, GL_TEXTURE_MAX_LOD, GL_TEXTURE_MAX_LEVEL,
58           GL_TEXTURE_SWIZZLE_R, GL_TEXTURE_SWIZZLE_G, GL_TEXTURE_SWIZZLE_B,
59           GL_TEXTURE_SWIZZLE_A, GL_TEXTURE_SWIZZLE_RGBA, GL_TEXTURE_WRAP_S,
60           GL_TEXTURE_WRAP_T, or GL_TEXTURE_WRAP_R.
61
62       params
63           Specifies a pointer to an array where the value or values of pname
64           are stored.
65

DESCRIPTION

67       glTexParameter assigns the value or values in params to the texture
68       parameter specified as pname.  target defines the target texture,
69       either GL_TEXTURE_1D, GL_TEXTURE_2D, GL_TEXTURE_1D_ARRAY,
70       GL_TEXTURE_2D_ARRAY, GL_TEXTURE_RECTANGLE, or GL_TEXTURE_3D. The
71       following symbols are accepted in pname:
72
73       GL_DEPTH_STENCIL_TEXTURE_MODE
74           Specifies the mode used to read from depth-stencil format textures.
75           params must be one of GL_DEPTH_COMPONENT or GL_STENCIL_COMPONENT.
76           If the depth stencil mode is GL_DEPTH_COMPONENT, then reads from
77           depth-stencil format textures will return the depth component of
78           the texel in Rt and the stencil component will be discarded. If the
79           depth stencil mode is GL_STENCIL_COMPONENT then the stencil
80           component is returned in Rt and the depth component is discarded.
81           The initial value is GL_DEPTH_COMPONENT.
82
83       GL_TEXTURE_BASE_LEVEL
84           Specifies the index of the lowest defined mipmap level. This is an
85           integer value. The initial value is 0.
86
87       GL_TEXTURE_BORDER_COLOR
88           The data in params specifies four values that define the border
89           values that should be used for border texels. If a texel is sampled
90           from the border of the texture, the values of
91           GL_TEXTURE_BORDER_COLOR are interpreted as an RGBA color to match
92           the texture's internal format and substituted for the non-existent
93           texel data. If the texture contains depth components, the first
94           component of GL_TEXTURE_BORDER_COLOR is interpreted as a depth
95           value. The initial value is 0.0, 0.0, 0.0, 0.0.
96
97           If the values for GL_TEXTURE_BORDER_COLOR are specified with
98           glTexParameterIiv or glTexParameterIuiv, the values are stored
99           unmodified with an internal data type of integer. If specified with
100           glTexParameteriv, they are converted to floating point with the
101           following equation: f = 2 c + 1 2 b - 1. If specified with
102           glTexParameterfv, they are stored unmodified as floating-point
103           values.
104
105       GL_TEXTURE_COMPARE_FUNC
106           Specifies the comparison operator used when GL_TEXTURE_COMPARE_MODE
107           is set to GL_COMPARE_REF_TO_TEXTURE. Permissible values are:
108
109           ┌────────────────────────────────────────────────┬───────────────────────────────────────────────────────────────────────────────┐
110           │                                                │                                                                               │
111Texture Computed                              
112Comparison Function                             result                                                                        
113           │                                                │                                                                               │
114           ├────────────────────────────────────────────────┼───────────────────────────────────────────────────────────────────────────────┤
115GL_LEQUAL                                       │ <div>                                                                         │
116           │                                                │                                                                               │
117           │                                                │                                                                               │
118           │                                                │                                                     result                    │
119           │                                                │                                                     =                         │
120           │                                                │                                                                               │
121           │                                                │                                                                               │
122           │                                                │                                                                               │
123           │                                                │                                                                               │
124           │                                                │                                                                     1.0       │
125           │                                                │                                                                               │
126           │                                                │                                                                               │
127           │                                                │                                                                     0.0       │
128           │                                                │                                                                               │
129           │                                                │                                                                               │
130           │                                                │                                                             ⁢                 │
131           │                                                │                                                                               │
132           │                                                │                                                                               │
133           │                                                │                                                                               │
134           │                                                │                                                                         r     │
135           │                                                │                                                                         <=    │
136           │                                                │                                                                               │
137           │                                                │                                                                             D │
138           │                                                │                                                                             t │
139           │                                                │                                                                               │
140           │                                                │                                                                               │
141           │                                                │                                                                               │
142           │                                                │                                                                               │
143           │                                                │                                                                               │
144           │                                                │                                                                               │
145           │                                                │                                                                         r     │
146           │                                                │                                                                         >     │
147           │                                                │                                                                               │
148           │                                                │                                                                             D │
149           │                                                │                                                                             t │
150           │                                                │                                                                               │
151           │                                                │                                                                               │
152           │                                                │                                                                               │
153           │                                                │                                                                               │
154           │                                                │                                                                               │
155           │                                                │                                                                               │
156           │                                                │                                                                               │
157           │                                                │                                                                               │
158           │                                                │                                             </div>                            │
159           ├────────────────────────────────────────────────┼───────────────────────────────────────────────────────────────────────────────┤
160GL_GEQUAL                                       │ <div>                                                                         │
161           │                                                │                                                                               │
162           │                                                │                                                                               │
163           │                                                │                                                     result                    │
164           │                                                │                                                     =                         │
165           │                                                │                                                                               │
166           │                                                │                                                                               │
167           │                                                │                                                                               │
168           │                                                │                                                                               │
169           │                                                │                                                                     1.0       │
170           │                                                │                                                                               │
171           │                                                │                                                                               │
172           │                                                │                                                                     0.0       │
173           │                                                │                                                                               │
174           │                                                │                                                                               │
175           │                                                │                                                             ⁢                 │
176           │                                                │                                                                               │
177           │                                                │                                                                               │
178           │                                                │                                                                               │
179           │                                                │                                                                         r     │
180           │                                                │                                                                         >=    │
181           │                                                │                                                                               │
182           │                                                │                                                                             D │
183           │                                                │                                                                             t │
184           │                                                │                                                                               │
185           │                                                │                                                                               │
186           │                                                │                                                                               │
187           │                                                │                                                                               │
188           │                                                │                                                                               │
189           │                                                │                                                                               │
190           │                                                │                                                                         r     │
191           │                                                │                                                                         <     │
192           │                                                │                                                                               │
193           │                                                │                                                                             D │
194           │                                                │                                                                             t │
195           │                                                │                                                                               │
196           │                                                │                                                                               │
197           │                                                │                                                                               │
198           │                                                │                                                                               │
199           │                                                │                                                                               │
200           │                                                │                                                                               │
201           │                                                │                                                                               │
202           │                                                │                                                                               │
203           │                                                │                                             </div>                            │
204           ├────────────────────────────────────────────────┼───────────────────────────────────────────────────────────────────────────────┤
205GL_LESS                                         │ <div>                                                                         │
206           │                                                │                                                                               │
207           │                                                │                                                                               │
208           │                                                │                                                     result                    │
209           │                                                │                                                     =                         │
210           │                                                │                                                                               │
211           │                                                │                                                                               │
212           │                                                │                                                                               │
213           │                                                │                                                                               │
214           │                                                │                                                                     1.0       │
215           │                                                │                                                                               │
216           │                                                │                                                                               │
217           │                                                │                                                                     0.0       │
218           │                                                │                                                                               │
219           │                                                │                                                                               │
220           │                                                │                                                             ⁢                 │
221           │                                                │                                                                               │
222           │                                                │                                                                               │
223           │                                                │                                                                               │
224           │                                                │                                                                         r     │
225           │                                                │                                                                         <     │
226           │                                                │                                                                               │
227           │                                                │                                                                             D │
228           │                                                │                                                                             t │
229           │                                                │                                                                               │
230           │                                                │                                                                               │
231           │                                                │                                                                               │
232           │                                                │                                                                               │
233           │                                                │                                                                               │
234           │                                                │                                                                               │
235           │                                                │                                                                         r     │
236           │                                                │                                                                         >=    │
237           │                                                │                                                                               │
238           │                                                │                                                                             D │
239           │                                                │                                                                             t │
240           │                                                │                                                                               │
241           │                                                │                                                                               │
242           │                                                │                                                                               │
243           │                                                │                                                                               │
244           │                                                │                                                                               │
245           │                                                │                                                                               │
246           │                                                │                                                                               │
247           │                                                │                                                                               │
248           │                                                │                                             </div>                            │
249           ├────────────────────────────────────────────────┼───────────────────────────────────────────────────────────────────────────────┤
250GL_GREATER                                      │ <div>                                                                         │
251           │                                                │                                                                               │
252           │                                                │                                                                               │
253           │                                                │                                                     result                    │
254           │                                                │                                                     =                         │
255           │                                                │                                                                               │
256           │                                                │                                                                               │
257           │                                                │                                                                               │
258           │                                                │                                                                               │
259           │                                                │                                                                     1.0       │
260           │                                                │                                                                               │
261           │                                                │                                                                               │
262           │                                                │                                                                     0.0       │
263           │                                                │                                                                               │
264           │                                                │                                                                               │
265           │                                                │                                                             ⁢                 │
266           │                                                │                                                                               │
267           │                                                │                                                                               │
268           │                                                │                                                                               │
269           │                                                │                                                                         r     │
270           │                                                │                                                                         >     │
271           │                                                │                                                                               │
272           │                                                │                                                                             D │
273           │                                                │                                                                             t │
274           │                                                │                                                                               │
275           │                                                │                                                                               │
276           │                                                │                                                                               │
277           │                                                │                                                                               │
278           │                                                │                                                                               │
279           │                                                │                                                                               │
280           │                                                │                                                                         r     │
281           │                                                │                                                                         <=    │
282           │                                                │                                                                               │
283           │                                                │                                                                             D │
284           │                                                │                                                                             t │
285           │                                                │                                                                               │
286           │                                                │                                                                               │
287           │                                                │                                                                               │
288           │                                                │                                                                               │
289           │                                                │                                                                               │
290           │                                                │                                                                               │
291           │                                                │                                                                               │
292           │                                                │                                                                               │
293           │                                                │                                             </div>                            │
294           ├────────────────────────────────────────────────┼───────────────────────────────────────────────────────────────────────────────┤
295GL_EQUAL                                        │ <div>                                                                         │
296           │                                                │                                                                               │
297           │                                                │                                                                               │
298           │                                                │                                                     result                    │
299           │                                                │                                                     =                         │
300           │                                                │                                                                               │
301           │                                                │                                                                               │
302           │                                                │                                                                               │
303           │                                                │                                                                               │
304           │                                                │                                                                     1.0       │
305           │                                                │                                                                               │
306           │                                                │                                                                               │
307           │                                                │                                                                     0.0       │
308           │                                                │                                                                               │
309           │                                                │                                                                               │
310           │                                                │                                                             ⁢                 │
311           │                                                │                                                                               │
312           │                                                │                                                                               │
313           │                                                │                                                                               │
314           │                                                │                                                                         r     │
315           │                                                │                                                                         =     │
316           │                                                │                                                                               │
317           │                                                │                                                                             D │
318           │                                                │                                                                             t │
319           │                                                │                                                                               │
320           │                                                │                                                                               │
321           │                                                │                                                                               │
322           │                                                │                                                                               │
323           │                                                │                                                                               │
324           │                                                │                                                                               │
325           │                                                │                                                                         r     │
326           │                                                │                                                                         ≠     │
327           │                                                │                                                                               │
328           │                                                │                                                                             D │
329           │                                                │                                                                             t │
330           │                                                │                                                                               │
331           │                                                │                                                                               │
332           │                                                │                                                                               │
333           │                                                │                                                                               │
334           │                                                │                                                                               │
335           │                                                │                                                                               │
336           │                                                │                                                                               │
337           │                                                │                                                                               │
338           │                                                │                                             </div>                            │
339           ├────────────────────────────────────────────────┼───────────────────────────────────────────────────────────────────────────────┤
340GL_NOTEQUAL                                     │ <div>                                                                         │
341           │                                                │                                                                               │
342           │                                                │                                                                               │
343           │                                                │                                                     result                    │
344           │                                                │                                                     =                         │
345           │                                                │                                                                               │
346           │                                                │                                                                               │
347           │                                                │                                                                               │
348           │                                                │                                                                               │
349           │                                                │                                                                     1.0       │
350           │                                                │                                                                               │
351           │                                                │                                                                               │
352           │                                                │                                                                     0.0       │
353           │                                                │                                                                               │
354           │                                                │                                                                               │
355           │                                                │                                                             ⁢                 │
356           │                                                │                                                                               │
357           │                                                │                                                                               │
358           │                                                │                                                                               │
359           │                                                │                                                                         r     │
360           │                                                │                                                                         ≠     │
361           │                                                │                                                                               │
362           │                                                │                                                                             D │
363           │                                                │                                                                             t │
364           │                                                │                                                                               │
365           │                                                │                                                                               │
366           │                                                │                                                                               │
367           │                                                │                                                                               │
368           │                                                │                                                                               │
369           │                                                │                                                                               │
370           │                                                │                                                                         r     │
371           │                                                │                                                                         =     │
372           │                                                │                                                                               │
373           │                                                │                                                                             D │
374           │                                                │                                                                             t │
375           │                                                │                                                                               │
376           │                                                │                                                                               │
377           │                                                │                                                                               │
378           │                                                │                                                                               │
379           │                                                │                                                                               │
380           │                                                │                                                                               │
381           │                                                │                                                                               │
382           │                                                │                                                                               │
383           │                                                │                                             </div>                            │
384           ├────────────────────────────────────────────────┼───────────────────────────────────────────────────────────────────────────────┤
385GL_ALWAYS                                       │ <div>                                                                         │
386           │                                                │                                                                               │
387           │                                                │                                                     result                    │
388           │                                                │                                                     =                         │
389           │                                                │                                                     1.0                       │
390           │                                                │                                                                               │
391           │                                                │                                                 </div>                        │
392           ├────────────────────────────────────────────────┼───────────────────────────────────────────────────────────────────────────────┤
393GL_NEVER                                        │ <div>                                                                         │
394           │                                                │                                                                               │
395           │                                                │                                                     result                    │
396           │                                                │                                                     =                         │
397           │                                                │                                                     0.0                       │
398           │                                                │                                                                               │
399           │                                                │                                                 </div>                        │
400           └────────────────────────────────────────────────┴───────────────────────────────────────────────────────────────────────────────┘
401           where r is the current interpolated texture coordinate, and D t is
402           the depth texture value sampled from the currently bound depth
403           texture.  result is assigned to the the red channel.
404
405       GL_TEXTURE_COMPARE_MODE
406           Specifies the texture comparison mode for currently bound depth
407           textures. That is, a texture whose internal format is
408           GL_DEPTH_COMPONENT_*; see glTexImage2D()) Permissible values are:
409
410           GL_COMPARE_REF_TO_TEXTURE
411               Specifies that the interpolated and clamped r texture
412               coordinate should be compared to the value in the currently
413               bound depth texture. See the discussion of
414               GL_TEXTURE_COMPARE_FUNC for details of how the comparison is
415               evaluated. The result of the comparison is assigned to the red
416               channel.
417
418           GL_NONE
419               Specifies that the red channel should be assigned the
420               appropriate value from the currently bound depth texture.
421
422
423       GL_TEXTURE_LOD_BIAS
424           params specifies a fixed bias value that is to be added to the
425           level-of-detail parameter for the texture before texture sampling.
426           The specified value is added to the shader-supplied bias value (if
427           any) and subsequently clamped into the implementation-defined range
428           - bias max bias max, where bias max is the value of the
429           implementation defined constant GL_MAX_TEXTURE_LOD_BIAS. The
430           initial value is 0.0.
431
432       GL_TEXTURE_MIN_FILTER
433           The texture minifying function is used whenever the level-of-detail
434           function used when sampling from the texture determines that the
435           texture should be minified. There are six defined minifying
436           functions. Two of them use either the nearest texture elements or a
437           weighted average of multiple texture elements to compute the
438           texture value. The other four use mipmaps.
439
440           A mipmap is an ordered set of arrays representing the same image at
441           progressively lower resolutions. If the texture has dimensions 2 n
442           × 2 m, there are max ⁡ n m + 1 mipmaps. The first mipmap is the
443           original texture, with dimensions 2 n × 2 m. Each subsequent mipmap
444           has dimensions 2 k - 1 × 2 l - 1, where 2 k × 2 l are the
445           dimensions of the previous mipmap, until either k = 0 or l = 0. At
446           that point, subsequent mipmaps have dimension 1 × 2 l - 1 or 2 k -
447           1 × 1 until the final mipmap, which has dimension 1 × 1. To define
448           the mipmaps, call glTexImage1D(), glTexImage2D(), glTexImage3D(),
449           glCopyTexImage1D(), or glCopyTexImage2D() with the level argument
450           indicating the order of the mipmaps. Level 0 is the original
451           texture; level max ⁡ n m is the final 1 × 1 mipmap.
452
453           params supplies a function for minifying the texture as one of the
454           following:
455
456           GL_NEAREST
457               Returns the value of the texture element that is nearest (in
458               Manhattan distance) to the specified texture coordinates.
459
460           GL_LINEAR
461               Returns the weighted average of the four texture elements that
462               are closest to the specified texture coordinates. These can
463               include items wrapped or repeated from other parts of a
464               texture, depending on the values of GL_TEXTURE_WRAP_S and
465               GL_TEXTURE_WRAP_T, and on the exact mapping.
466
467           GL_NEAREST_MIPMAP_NEAREST
468               Chooses the mipmap that most closely matches the size of the
469               pixel being textured and uses the GL_NEAREST criterion (the
470               texture element closest to the specified texture coordinates)
471               to produce a texture value.
472
473           GL_LINEAR_MIPMAP_NEAREST
474               Chooses the mipmap that most closely matches the size of the
475               pixel being textured and uses the GL_LINEAR criterion (a
476               weighted average of the four texture elements that are closest
477               to the specified texture coordinates) to produce a texture
478               value.
479
480           GL_NEAREST_MIPMAP_LINEAR
481               Chooses the two mipmaps that most closely match the size of the
482               pixel being textured and uses the GL_NEAREST criterion (the
483               texture element closest to the specified texture coordinates )
484               to produce a texture value from each mipmap. The final texture
485               value is a weighted average of those two values.
486
487           GL_LINEAR_MIPMAP_LINEAR
488               Chooses the two mipmaps that most closely match the size of the
489               pixel being textured and uses the GL_LINEAR criterion (a
490               weighted average of the texture elements that are closest to
491               the specified texture coordinates) to produce a texture value
492               from each mipmap. The final texture value is a weighted average
493               of those two values.
494
495           As more texture elements are sampled in the minification process,
496           fewer aliasing artifacts will be apparent. While the GL_NEAREST and
497           GL_LINEAR minification functions can be faster than the other four,
498           they sample only one or multiple texture elements to determine the
499           texture value of the pixel being rendered and can produce moire
500           patterns or ragged transitions. The initial value of
501           GL_TEXTURE_MIN_FILTER is GL_NEAREST_MIPMAP_LINEAR.
502
503       GL_TEXTURE_MAG_FILTER
504           The texture magnification function is used whenever the
505           level-of-detail function used when sampling from the texture
506           determines that the texture should be magified. It sets the texture
507           magnification function to either GL_NEAREST or GL_LINEAR (see
508           below).  GL_NEAREST is generally faster than GL_LINEAR, but it can
509           produce textured images with sharper edges because the transition
510           between texture elements is not as smooth. The initial value of
511           GL_TEXTURE_MAG_FILTER is GL_LINEAR.
512
513           GL_NEAREST
514               Returns the value of the texture element that is nearest (in
515               Manhattan distance) to the specified texture coordinates.
516
517           GL_LINEAR
518               Returns the weighted average of the texture elements that are
519               closest to the specified texture coordinates. These can include
520               items wrapped or repeated from other parts of a texture,
521               depending on the values of GL_TEXTURE_WRAP_S and
522               GL_TEXTURE_WRAP_T, and on the exact mapping.
523
524
525       GL_TEXTURE_MIN_LOD
526           Sets the minimum level-of-detail parameter. This floating-point
527           value limits the selection of highest resolution mipmap (lowest
528           mipmap level). The initial value is -1000.
529
530       GL_TEXTURE_MAX_LOD
531           Sets the maximum level-of-detail parameter. This floating-point
532           value limits the selection of the lowest resolution mipmap (highest
533           mipmap level). The initial value is 1000.
534
535       GL_TEXTURE_MAX_LEVEL
536           Sets the index of the highest defined mipmap level. This is an
537           integer value. The initial value is 1000.
538
539       GL_TEXTURE_SWIZZLE_R
540           Sets the swizzle that will be applied to the r component of a texel
541           before it is returned to the shader. Valid values for param are
542           GL_RED, GL_GREEN, GL_BLUE, GL_ALPHA, GL_ZERO and GL_ONE. If
543           GL_TEXTURE_SWIZZLE_R is GL_RED, the value for r will be taken from
544           the first channel of the fetched texel. If GL_TEXTURE_SWIZZLE_R is
545           GL_GREEN, the value for r will be taken from the second channel of
546           the fetched texel. If GL_TEXTURE_SWIZZLE_R is GL_BLUE, the value
547           for r will be taken from the third channel of the fetched texel. If
548           GL_TEXTURE_SWIZZLE_R is GL_ALPHA, the value for r will be taken
549           from the fourth channel of the fetched texel. If
550           GL_TEXTURE_SWIZZLE_R is GL_ZERO, the value for r will be subtituted
551           with 0.0. If GL_TEXTURE_SWIZZLE_R is GL_ONE, the value for r will
552           be subtituted with 1.0. The initial value is GL_RED.
553
554       GL_TEXTURE_SWIZZLE_G
555           Sets the swizzle that will be applied to the g component of a texel
556           before it is returned to the shader. Valid values for param and
557           their effects are similar to those of GL_TEXTURE_SWIZZLE_R. The
558           initial value is GL_GREEN.
559
560       GL_TEXTURE_SWIZZLE_B
561           Sets the swizzle that will be applied to the b component of a texel
562           before it is returned to the shader. Valid values for param and
563           their effects are similar to those of GL_TEXTURE_SWIZZLE_R. The
564           initial value is GL_BLUE.
565
566       GL_TEXTURE_SWIZZLE_A
567           Sets the swizzle that will be applied to the a component of a texel
568           before it is returned to the shader. Valid values for param and
569           their effects are similar to those of GL_TEXTURE_SWIZZLE_R. The
570           initial value is GL_ALPHA.
571
572       GL_TEXTURE_SWIZZLE_RGBA
573           Sets the swizzles that will be applied to the r, g, b, and a
574           components of a texel before they are returned to the shader. Valid
575           values for params and their effects are similar to those of
576           GL_TEXTURE_SWIZZLE_R, except that all channels are specified
577           simultaneously. Setting the value of GL_TEXTURE_SWIZZLE_RGBA is
578           equivalent (assuming no errors are generated) to setting the
579           parameters of each of GL_TEXTURE_SWIZZLE_R, GL_TEXTURE_SWIZZLE_G,
580           GL_TEXTURE_SWIZZLE_B, and GL_TEXTURE_SWIZZLE_A successively.
581
582       GL_TEXTURE_WRAP_S
583           Sets the wrap parameter for texture coordinate s to either
584           GL_CLAMP_TO_EDGE, GL_CLAMP_TO_BORDER, GL_MIRRORED_REPEAT, or
585           GL_REPEAT.  GL_CLAMP_TO_EDGE causes s coordinates to be clamped to
586           the range 1 2N 1 - 1 2N, where N is the size of the texture in the
587           direction of clamping.  GL_CLAMP_TO_BORDER evaluates s coordinates
588           in a similar manner to GL_CLAMP_TO_EDGE. However, in cases where
589           clamping would have occurred in GL_CLAMP_TO_EDGE mode, the fetched
590           texel data is substituted with the values specified by
591           GL_TEXTURE_BORDER_COLOR.  GL_REPEAT causes the integer part of the
592           s coordinate to be ignored; the GL uses only the fractional part,
593           thereby creating a repeating pattern.  GL_MIRRORED_REPEAT causes
594           the s coordinate to be set to the fractional part of the texture
595           coordinate if the integer part of s is even; if the integer part of
596           s is odd, then the s texture coordinate is set to 1 - frac ⁡ s,
597           where frac ⁡ s represents the fractional part of s. Initially,
598           GL_TEXTURE_WRAP_S is set to GL_REPEAT.
599
600       GL_TEXTURE_WRAP_T
601           Sets the wrap parameter for texture coordinate t to either
602           GL_CLAMP_TO_EDGE, GL_CLAMP_TO_BORDER, GL_MIRRORED_REPEAT, or
603           GL_REPEAT. See the discussion under GL_TEXTURE_WRAP_S. Initially,
604           GL_TEXTURE_WRAP_T is set to GL_REPEAT.
605
606       GL_TEXTURE_WRAP_R
607           Sets the wrap parameter for texture coordinate r to either
608           GL_CLAMP_TO_EDGE, GL_CLAMP_TO_BORDER, GL_MIRRORED_REPEAT, or
609           GL_REPEAT. See the discussion under GL_TEXTURE_WRAP_S. Initially,
610           GL_TEXTURE_WRAP_R is set to GL_REPEAT.
611

NOTES

613       Suppose that a program attempts to sample from a texture and has set
614       GL_TEXTURE_MIN_FILTER to one of the functions that requires a mipmap.
615       If either the dimensions of the texture images currently defined (with
616       previous calls to glTexImage1D(), glTexImage2D(), glTexImage3D(),
617       glCopyTexImage1D(), or glCopyTexImage2D()) do not follow the proper
618       sequence for mipmaps (described above), or there are fewer texture
619       images defined than are needed, or the set of texture images have
620       differing numbers of texture components, then the texture is considered
621       incomplete.
622
623       Linear filtering accesses the four nearest texture elements only in 2D
624       textures. In 1D textures, linear filtering accesses the two nearest
625       texture elements. In 3D textures, linear filtering accesses the eight
626       nearest texture elements.
627
628       glTexParameter specifies the texture parameters for the active texture
629       unit, specified by calling glActiveTexture().
630
631       GL_DEPTH_STENCIL_TEXTURE_MODE is available only if the GL version is
632       4.3 or greater.
633

ERRORS

635       GL_INVALID_ENUM is generated if target or pname is not one of the
636       accepted defined values.
637
638       GL_INVALID_ENUM is generated if params should have a defined constant
639       value (based on the value of pname) and does not.
640

ASSOCIATED GETS

642       glGetTexParameter()
643
644       glGetTexLevelParameter()
645

SEE ALSO

647       glActiveTexture(), glBindTexture(), glCopyTexImage1D(),
648       glCopyTexImage2D(), glCopyTexSubImage1D(), glCopyTexSubImage2D(),
649       glCopyTexSubImage3D(), glPixelStore(), glSamplerParameter(),
650       glTexImage1D(), glTexImage2D(), glTexImage3D(), glTexSubImage1D(),
651       glTexSubImage2D(), glTexSubImage3D()
652
654       Copyright © 1991-2006 Silicon Graphics, Inc. This document is licensed
655       under the SGI Free Software B License. For details, see
656       http://oss.sgi.com/projects/FreeB/.
657

AUTHORS

659       opengl.org
660
661
662
663opengl.org                        06/10/2014                GLTEXPARAMETER(3G)
Impressum