/
glTexImage2D.xhtml
726 lines (718 loc) · 54 KB
/
glTexImage2D.xhtml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
<div class="refentry" lang="en" xml:lang="en"><a id="glTexImage2D"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>glTexImage2D — specify a two-dimensional texture image</p></div><div class="refsynopsisdiv"><h2>C Specification</h2><div class="funcsynopsis"><table><tr><td><code class="funcdef">void <b class="fsfunc">glTexImage2D</b>(</code></td><td>GLenum </td><td><var class="pdparam">target</var>, </td></tr><tr><td> </td><td>GLint </td><td><var class="pdparam">level</var>, </td></tr><tr><td> </td><td>GLint </td><td><var class="pdparam">internalFormat</var>, </td></tr><tr><td> </td><td>GLsizei </td><td><var class="pdparam">width</var>, </td></tr><tr><td> </td><td>GLsizei </td><td><var class="pdparam">height</var>, </td></tr><tr><td> </td><td>GLint </td><td><var class="pdparam">border</var>, </td></tr><tr><td> </td><td>GLenum </td><td><var class="pdparam">format</var>, </td></tr><tr><td> </td><td>GLenum </td><td><var class="pdparam">type</var>, </td></tr><tr><td> </td><td>const GLvoid * </td><td><var class="pdparam">data</var><code>)</code>;</td></tr></table></div></div><p>
</p><div class="refsect1" lang="en" xml:lang="en"><a id="parameters"></a><h2>Parameters</h2><div class="variablelist"><dl><dt><span class="term"><em class="parameter"><code>target</code></em></span></dt><dd><p>
Specifies the target texture.
Must be <code class="constant">GL_TEXTURE_2D</code>, <code class="constant">GL_PROXY_TEXTURE_2D</code>,
<code class="constant">GL_TEXTURE_CUBE_MAP_POSITIVE_X</code>,
<code class="constant">GL_TEXTURE_CUBE_MAP_NEGATIVE_X</code>,
<code class="constant">GL_TEXTURE_CUBE_MAP_POSITIVE_Y</code>,
<code class="constant">GL_TEXTURE_CUBE_MAP_NEGATIVE_Y</code>,
<code class="constant">GL_TEXTURE_CUBE_MAP_POSITIVE_Z</code>,
<code class="constant">GL_TEXTURE_CUBE_MAP_NEGATIVE_Z</code>, or
<code class="constant">GL_PROXY_TEXTURE_CUBE_MAP</code>.
</p></dd><dt><span class="term"><em class="parameter"><code>level</code></em></span></dt><dd><p>
Specifies the level-of-detail number.
Level 0 is the base image level.
Level <span class="emphasis"><em>n</em></span> is the <span class="emphasis"><em>n</em></span>th mipmap reduction image.
</p></dd><dt><span class="term"><em class="parameter"><code>internalFormat</code></em></span></dt><dd><p>
Specifies the number of color components in the texture.
Must be 1, 2, 3, or 4, or one of the following symbolic constants:
<code class="constant">GL_ALPHA</code>,
<code class="constant">GL_ALPHA4</code>,
<code class="constant">GL_ALPHA8</code>,
<code class="constant">GL_ALPHA12</code>,
<code class="constant">GL_ALPHA16</code>,
<code class="constant">GL_COMPRESSED_ALPHA</code>,
<code class="constant">GL_COMPRESSED_LUMINANCE</code>,
<code class="constant">GL_COMPRESSED_LUMINANCE_ALPHA</code>,
<code class="constant">GL_COMPRESSED_INTENSITY</code>,
<code class="constant">GL_COMPRESSED_RGB</code>,
<code class="constant">GL_COMPRESSED_RGBA</code>,
<code class="constant">GL_DEPTH_COMPONENT</code>,
<code class="constant">GL_DEPTH_COMPONENT16</code>,
<code class="constant">GL_DEPTH_COMPONENT24</code>,
<code class="constant">GL_DEPTH_COMPONENT32</code>,
<code class="constant">GL_LUMINANCE</code>,
<code class="constant">GL_LUMINANCE4</code>,
<code class="constant">GL_LUMINANCE8</code>,
<code class="constant">GL_LUMINANCE12</code>,
<code class="constant">GL_LUMINANCE16</code>,
<code class="constant">GL_LUMINANCE_ALPHA</code>,
<code class="constant">GL_LUMINANCE4_ALPHA4</code>,
<code class="constant">GL_LUMINANCE6_ALPHA2</code>,
<code class="constant">GL_LUMINANCE8_ALPHA8</code>,
<code class="constant">GL_LUMINANCE12_ALPHA4</code>,
<code class="constant">GL_LUMINANCE12_ALPHA12</code>,
<code class="constant">GL_LUMINANCE16_ALPHA16</code>,
<code class="constant">GL_INTENSITY</code>,
<code class="constant">GL_INTENSITY4</code>,
<code class="constant">GL_INTENSITY8</code>,
<code class="constant">GL_INTENSITY12</code>,
<code class="constant">GL_INTENSITY16</code>,
<code class="constant">GL_R3_G3_B2</code>,
<code class="constant">GL_RGB</code>,
<code class="constant">GL_RGB4</code>,
<code class="constant">GL_RGB5</code>,
<code class="constant">GL_RGB8</code>,
<code class="constant">GL_RGB10</code>,
<code class="constant">GL_RGB12</code>,
<code class="constant">GL_RGB16</code>,
<code class="constant">GL_RGBA</code>,
<code class="constant">GL_RGBA2</code>,
<code class="constant">GL_RGBA4</code>,
<code class="constant">GL_RGB5_A1</code>,
<code class="constant">GL_RGBA8</code>,
<code class="constant">GL_RGB10_A2</code>,
<code class="constant">GL_RGBA12</code>,
<code class="constant">GL_RGBA16</code>,
<code class="constant">GL_SLUMINANCE</code>,
<code class="constant">GL_SLUMINANCE8</code>,
<code class="constant">GL_SLUMINANCE_ALPHA</code>,
<code class="constant">GL_SLUMINANCE8_ALPHA8</code>,
<code class="constant">GL_SRGB</code>,
<code class="constant">GL_SRGB8</code>,
<code class="constant">GL_SRGB_ALPHA</code>, or
<code class="constant">GL_SRGB8_ALPHA8</code>.
</p></dd><dt><span class="term"><em class="parameter"><code>width</code></em></span></dt><dd><p>
Specifies the width of the texture image including the border if any. If the GL version does not support non-power-of-two sizes, this value must be
<math overflow="scroll">
<mrow>
<msup><mn>2</mn>
<mi mathvariant="italic">n</mi>
</msup>
<mo>+</mo>
<mrow>
<mn>2</mn>
<mo></mo>
<mfenced open="(" close=")">
<mi mathvariant="italic">border</mi>
</mfenced>
</mrow>
</mrow>
</math>
for some integer
<math overflow="scroll"><mi mathvariant="italic">n</mi></math>.
All
implementations support texture images that are at least 64 texels
wide.
</p></dd><dt><span class="term"><em class="parameter"><code>height</code></em></span></dt><dd><p>
Specifies the height of the texture image including the border if any. If the GL version does not support non-power-of-two sizes, this value must be
<math overflow="scroll">
<mrow>
<msup><mn>2</mn>
<mi mathvariant="italic">m</mi>
</msup>
<mo>+</mo>
<mrow>
<mn>2</mn>
<mo></mo>
<mfenced open="(" close=")">
<mi mathvariant="italic">border</mi>
</mfenced>
</mrow>
</mrow>
</math>
for some integer
<math overflow="scroll"><mi mathvariant="italic">m</mi></math>.
All
implementations support texture images that are at least 64 texels
high.
</p></dd><dt><span class="term"><em class="parameter"><code>border</code></em></span></dt><dd><p>
Specifies the width of the border.
Must be either 0 or 1.
</p></dd><dt><span class="term"><em class="parameter"><code>format</code></em></span></dt><dd><p>
Specifies the format of the pixel data.
The following symbolic values are accepted:
<code class="constant">GL_COLOR_INDEX</code>,
<code class="constant">GL_RED</code>,
<code class="constant">GL_GREEN</code>,
<code class="constant">GL_BLUE</code>,
<code class="constant">GL_ALPHA</code>,
<code class="constant">GL_RGB</code>,
<code class="constant">GL_BGR</code>,
<code class="constant">GL_RGBA</code>,
<code class="constant">GL_BGRA</code>,
<code class="constant">GL_LUMINANCE</code>, and
<code class="constant">GL_LUMINANCE_ALPHA</code>.
</p></dd><dt><span class="term"><em class="parameter"><code>type</code></em></span></dt><dd><p>
Specifies the data type of the pixel data.
The following symbolic values are accepted:
<code class="constant">GL_UNSIGNED_BYTE</code>,
<code class="constant">GL_BYTE</code>,
<code class="constant">GL_BITMAP</code>,
<code class="constant">GL_UNSIGNED_SHORT</code>,
<code class="constant">GL_SHORT</code>,
<code class="constant">GL_UNSIGNED_INT</code>,
<code class="constant">GL_INT</code>,
<code class="constant">GL_FLOAT</code>,
<code class="constant">GL_UNSIGNED_BYTE_3_3_2</code>,
<code class="constant">GL_UNSIGNED_BYTE_2_3_3_REV</code>,
<code class="constant">GL_UNSIGNED_SHORT_5_6_5</code>,
<code class="constant">GL_UNSIGNED_SHORT_5_6_5_REV</code>,
<code class="constant">GL_UNSIGNED_SHORT_4_4_4_4</code>,
<code class="constant">GL_UNSIGNED_SHORT_4_4_4_4_REV</code>,
<code class="constant">GL_UNSIGNED_SHORT_5_5_5_1</code>,
<code class="constant">GL_UNSIGNED_SHORT_1_5_5_5_REV</code>,
<code class="constant">GL_UNSIGNED_INT_8_8_8_8</code>,
<code class="constant">GL_UNSIGNED_INT_8_8_8_8_REV</code>,
<code class="constant">GL_UNSIGNED_INT_10_10_10_2</code>, and
<code class="constant">GL_UNSIGNED_INT_2_10_10_10_REV</code>.
</p></dd><dt><span class="term"><em class="parameter"><code>data</code></em></span></dt><dd><p>
Specifies a pointer to the image data in memory.
</p></dd></dl></div></div><div class="refsect1" lang="en" xml:lang="en"><a id="description"></a><h2>Description</h2><p>
Texturing maps a portion of a specified texture image onto each graphical primitive for which texturing is enabled. To enable and disable two-dimensional texturing, call <a class="citerefentry" href="glEnable"><span class="citerefentry"><span class="refentrytitle">glEnable</span></span></a> and <a class="citerefentry" href="glDisable"><span class="citerefentry"><span class="refentrytitle">glDisable</span></span></a> with argument <code class="constant">GL_TEXTURE_2D</code>. To enable and disable texturing using cube-mapped texture, call <a class="citerefentry" href="glEnable"><span class="citerefentry"><span class="refentrytitle">glEnable</span></span></a> and <a class="citerefentry" href="glDisable"><span class="citerefentry"><span class="refentrytitle">glDisable</span></span></a> with argument <code class="constant">GL_TEXTURE_CUBE_MAP</code>.
</p><p>
To define texture images, call <code class="function">glTexImage2D</code>.
The arguments describe the parameters of the texture image,
such as height,
width,
width of the border,
level-of-detail number
(see <a class="citerefentry" href="glTexParameter"><span class="citerefentry"><span class="refentrytitle">glTexParameter</span></span></a>),
and number of color components provided.
The last three arguments describe how the image is represented in memory;
they are identical to the pixel formats used for <a class="citerefentry" href="glDrawPixels"><span class="citerefentry"><span class="refentrytitle">glDrawPixels</span></span></a>.
</p><p>
If <em class="parameter"><code>target</code></em> is <code class="constant">GL_PROXY_TEXTURE_2D</code> or <code class="constant">GL_PROXY_TEXTURE_CUBE_MAP</code>, no data is read from <em class="parameter"><code>data</code></em>, but
all of the texture image state is recalculated, checked for
consistency, and checked
against the implementation's capabilities. If the implementation cannot
handle a texture of the requested texture size, it sets
all of the image state to 0,
but does not generate an error (see <a class="citerefentry" href="glGetError"><span class="citerefentry"><span class="refentrytitle">glGetError</span></span></a>). To query for an
entire mipmap array, use an image array level greater than or equal to
1.
</p><p>
If <em class="parameter"><code>target</code></em> is <code class="constant">GL_TEXTURE_2D</code>, or one of the <code class="constant">GL_TEXTURE_CUBE_MAP</code>
targets, data is read from <em class="parameter"><code>data</code></em> as a sequence of signed or unsigned
bytes, shorts, or longs, or single-precision floating-point values,
depending on <em class="parameter"><code>type</code></em>. These values are grouped into sets of one, two,
three, or four values, depending on <em class="parameter"><code>format</code></em>, to form elements. If <em class="parameter"><code>type</code></em>
is <code class="constant">GL_BITMAP</code>, the data is considered as a string of unsigned bytes
(and <em class="parameter"><code>format</code></em> must be <code class="constant">GL_COLOR_INDEX</code>).
Each data byte is treated as eight 1-bit elements,
with bit ordering determined by <code class="constant">GL_UNPACK_LSB_FIRST</code>
(see <a class="citerefentry" href="glPixelStore"><span class="citerefentry"><span class="refentrytitle">glPixelStore</span></span></a>).
</p><p>
If a non-zero named buffer object is bound to the <code class="constant">GL_PIXEL_UNPACK_BUFFER</code> target
(see <a class="citerefentry" href="glBindBuffer"><span class="citerefentry"><span class="refentrytitle">glBindBuffer</span></span></a>) while a texture image is
specified, <em class="parameter"><code>data</code></em> is treated as a byte offset into the buffer object's data store.
</p><p>
The first element corresponds to the lower left corner of the texture
image.
Subsequent elements progress left-to-right through the remaining texels
in the lowest row of the texture image, and then in successively higher
rows of the texture image.
The final element corresponds to the upper right corner of the texture
image.
</p><p>
<em class="parameter"><code>format</code></em> determines the composition of each element in <em class="parameter"><code>data</code></em>.
It can assume one of these symbolic values:
</p><div class="variablelist"><dl><dt><span class="term"><code class="constant">GL_COLOR_INDEX</code></span></dt><dd><p>
Each element is a single value,
a color index.
The GL converts it to fixed point
(with an unspecified number of zero bits to the right of the binary point),
shifted left or right depending on the value and sign of <code class="constant">GL_INDEX_SHIFT</code>,
and added to <code class="constant">GL_INDEX_OFFSET</code>
(see <a class="citerefentry" href="glPixelTransfer"><span class="citerefentry"><span class="refentrytitle">glPixelTransfer</span></span></a>).
The resulting index is converted to a set of color components
using the
<code class="constant">GL_PIXEL_MAP_I_TO_R</code>,
<code class="constant">GL_PIXEL_MAP_I_TO_G</code>,
<code class="constant">GL_PIXEL_MAP_I_TO_B</code>, and
<code class="constant">GL_PIXEL_MAP_I_TO_A</code> tables,
and clamped to the range [0,1].
</p></dd><dt><span class="term"><code class="constant">GL_RED</code></span></dt><dd><p>
Each element is a single red component.
The GL converts it to floating point and assembles it into an RGBA element
by attaching 0 for green and blue, and 1 for alpha.
Each component is then multiplied by the signed scale factor <code class="constant">GL_c_SCALE</code>,
added to the signed bias <code class="constant">GL_c_BIAS</code>,
and clamped to the range [0,1]
(see <a class="citerefentry" href="glPixelTransfer"><span class="citerefentry"><span class="refentrytitle">glPixelTransfer</span></span></a>).
</p></dd><dt><span class="term"><code class="constant">GL_GREEN</code></span></dt><dd><p>
Each element is a single green component.
The GL converts it to floating point and assembles it into an RGBA element
by attaching 0 for red and blue, and 1 for alpha.
Each component is then multiplied by the signed scale factor <code class="constant">GL_c_SCALE</code>,
added to the signed bias <code class="constant">GL_c_BIAS</code>,
and clamped to the range [0,1]
(see <a class="citerefentry" href="glPixelTransfer"><span class="citerefentry"><span class="refentrytitle">glPixelTransfer</span></span></a>).
</p></dd><dt><span class="term"><code class="constant">GL_BLUE</code></span></dt><dd><p>
Each element is a single blue component.
The GL converts it to floating point and assembles it into an RGBA element
by attaching 0 for red and green, and 1 for alpha.
Each component is then multiplied by the signed scale factor <code class="constant">GL_c_SCALE</code>,
added to the signed bias <code class="constant">GL_c_BIAS</code>,
and clamped to the range [0,1]
(see <a class="citerefentry" href="glPixelTransfer"><span class="citerefentry"><span class="refentrytitle">glPixelTransfer</span></span></a>).
</p></dd><dt><span class="term"><code class="constant">GL_ALPHA</code></span></dt><dd><p>
Each element is a single alpha component.
The GL converts it to floating point and assembles it into an RGBA element
by attaching 0 for red, green, and blue.
Each component is then multiplied by the signed scale factor <code class="constant">GL_c_SCALE</code>,
added to the signed bias <code class="constant">GL_c_BIAS</code>,
and clamped to the range [0,1]
(see <a class="citerefentry" href="glPixelTransfer"><span class="citerefentry"><span class="refentrytitle">glPixelTransfer</span></span></a>).
</p></dd><dt><span class="term"><code class="constant">GL_INTENSITY</code></span></dt><dd><p>
Each element is a single intensity value.
The GL converts it to floating point,
then assembles it into an RGBA element by replicating the intensity value
three times for red, green, blue, and alpha.
Each component is then multiplied by the signed scale factor <code class="constant">GL_c_SCALE</code>,
added to the signed bias <code class="constant">GL_c_BIAS</code>,
and clamped to the range [0,1]
(see <a class="citerefentry" href="glPixelTransfer"><span class="citerefentry"><span class="refentrytitle">glPixelTransfer</span></span></a>).
</p></dd><dt><span class="term"><code class="constant">GL_RGB</code></span></dt><dd></dd><dt><span class="term"><code class="constant">GL_BGR</code></span></dt><dd><p>
Each element is an RGB triple.
The GL converts it to floating point and assembles it into an RGBA element
by attaching 1 for alpha.
Each component is then multiplied by the signed scale factor <code class="constant">GL_c_SCALE</code>,
added to the signed bias <code class="constant">GL_c_BIAS</code>,
and clamped to the range [0,1]
(see <a class="citerefentry" href="glPixelTransfer"><span class="citerefentry"><span class="refentrytitle">glPixelTransfer</span></span></a>).
</p></dd><dt><span class="term"><code class="constant">GL_RGBA</code></span></dt><dd></dd><dt><span class="term"><code class="constant">GL_BGRA</code></span></dt><dd><p>
Each element contains all four components.
Each component is multiplied by the signed scale factor <code class="constant">GL_c_SCALE</code>,
added to the signed bias <code class="constant">GL_c_BIAS</code>,
and clamped to the range [0,1]
(see <a class="citerefentry" href="glPixelTransfer"><span class="citerefentry"><span class="refentrytitle">glPixelTransfer</span></span></a>).
</p></dd><dt><span class="term"><code class="constant">GL_LUMINANCE</code></span></dt><dd><p>
Each element is a single luminance value.
The GL converts it to floating point,
then assembles it into an RGBA element by replicating the luminance value
three times for red, green, and blue and attaching 1 for alpha.
Each component is then multiplied by the signed scale factor <code class="constant">GL_c_SCALE</code>,
added to the signed bias <code class="constant">GL_c_BIAS</code>,
and clamped to the range [0,1]
(see <a class="citerefentry" href="glPixelTransfer"><span class="citerefentry"><span class="refentrytitle">glPixelTransfer</span></span></a>).
</p></dd><dt><span class="term"><code class="constant">GL_LUMINANCE_ALPHA</code></span></dt><dd><p>
Each element is a luminance/alpha pair.
The GL converts it to floating point,
then assembles it into an RGBA element by replicating the luminance value
three times for red, green, and blue.
Each component is then multiplied by the signed scale factor <code class="constant">GL_c_SCALE</code>,
added to the signed bias <code class="constant">GL_c_BIAS</code>,
and clamped to the range [0,1] (see <a class="citerefentry" href="glPixelTransfer"><span class="citerefentry"><span class="refentrytitle">glPixelTransfer</span></span></a>).
</p></dd><dt><span class="term"><code class="constant">GL_DEPTH_COMPONENT</code></span></dt><dd><p>
Each element is a single depth value.
The GL converts it to floating point, multiplies by the signed scale factor
<code class="constant">GL_DEPTH_SCALE</code>, adds the signed bias <code class="constant">GL_DEPTH_BIAS</code>,
and clamps to the range [0,1] (see <a class="citerefentry" href="glPixelTransfer"><span class="citerefentry"><span class="refentrytitle">glPixelTransfer</span></span></a>).
</p></dd></dl></div><p>
Refer to the <a class="citerefentry" href="glDrawPixels"><span class="citerefentry"><span class="refentrytitle">glDrawPixels</span></span></a> reference page for a description of
the acceptable values for the <em class="parameter"><code>type</code></em> parameter.
</p><p>
If an application wants to store the texture at a certain
resolution or in a certain format, it can request the resolution
and format with <em class="parameter"><code>internalFormat</code></em>. The GL will choose an internal
representation that closely approximates that requested by <em class="parameter"><code>internalFormat</code></em>, but
it may not match exactly.
(The representations specified by <code class="constant">GL_LUMINANCE</code>,
<code class="constant">GL_LUMINANCE_ALPHA</code>, <code class="constant">GL_RGB</code>,
and <code class="constant">GL_RGBA</code> must match exactly. The numeric values 1, 2, 3, and 4
may also be used to specify the above representations.)
</p><p>
If the <em class="parameter"><code>internalFormat</code></em> parameter is one of the generic compressed formats,
<code class="constant">GL_COMPRESSED_ALPHA</code>,
<code class="constant">GL_COMPRESSED_INTENSITY</code>,
<code class="constant">GL_COMPRESSED_LUMINANCE</code>,
<code class="constant">GL_COMPRESSED_LUMINANCE_ALPHA</code>,
<code class="constant">GL_COMPRESSED_RGB</code>, or
<code class="constant">GL_COMPRESSED_RGBA</code>, the GL will replace the internal format with the symbolic constant for a specific internal format and compress the texture before storage. If no corresponding internal format is available, or the GL can not compress that image for any reason, the internal format is instead replaced with a corresponding base internal format.
</p><p>
If the <em class="parameter"><code>internalFormat</code></em> parameter is
<code class="constant">GL_SRGB</code>,
<code class="constant">GL_SRGB8</code>,
<code class="constant">GL_SRGB_ALPHA</code>,
<code class="constant">GL_SRGB8_ALPHA8</code>,
<code class="constant">GL_SLUMINANCE</code>,
<code class="constant">GL_SLUMINANCE8</code>,
<code class="constant">GL_SLUMINANCE_ALPHA</code>, or
<code class="constant">GL_SLUMINANCE8_ALPHA8</code>, the texture is treated as if the red, green, blue, or luminance components are encoded in the sRGB color space. Any alpha component is left unchanged. The conversion from the sRGB encoded component
<math overflow="scroll">
<msub><mi mathvariant="italic">c</mi>
<mi mathvariant="italic">s</mi>
</msub>
</math>
to a linear component
<math overflow="scroll">
<msub><mi mathvariant="italic">c</mi>
<mi mathvariant="italic">l</mi>
</msub>
</math>
is:
</p><p>
<math overflow="scroll">
<mrow>
<msub>
<mi mathvariant="italic">c</mi>
<mi mathvariant="italic">l</mi>
</msub>
<mo>=</mo>
<mrow>
<mo>{</mo>
<mtable columnalign="left">
<mtr>
<mtd columnalign="left">
<mfrac>
<msub>
<mi mathvariant="italic">c</mi>
<mi mathvariant="italic">s</mi>
</msub>
<mn>12.92</mn>
</mfrac>
</mtd>
<mtd columnalign="left">
<mrow>
<mspace width="1ex"></mspace>
<mo>if</mo>
<mspace width="1ex"></mspace>
</mrow>
<msub>
<mi mathvariant="italic">c</mi>
<mi mathvariant="italic">s</mi>
</msub>
<mo>≤</mo>
<mn>0.04045</mn>
</mtd>
</mtr>
<mtr>
<mtd columnalign="left">
<msup>
<mrow>
<mo>(</mo>
<mfrac>
<mrow>
<msub>
<mi>c</mi>
<mi>s</mi>
</msub>
<mo>+</mo>
<mn>0.055</mn>
</mrow>
<mn>1.055</mn>
</mfrac>
<mo>)</mo>
</mrow>
<mn>2.4</mn>
</msup>
</mtd>
<mtd columnalign="left">
<mrow>
<mspace width="1ex"></mspace>
<mo>if</mo>
<mspace width="1ex"></mspace>
</mrow>
<msub>
<mi mathvariant="italic">c</mi>
<mi mathvariant="italic">s</mi>
</msub>
<mo>></mo>
<mn>0.04045</mn>
</mtd>
</mtr>
</mtable>
</mrow>
</mrow>
</math>
</p><p>
Assume
<math overflow="scroll">
<msub><mi mathvariant="italic">c</mi>
<mi mathvariant="italic">s</mi>
</msub>
</math>
is the sRGB component in the range [0,1].
</p><p>
Use the <code class="constant">GL_PROXY_TEXTURE_2D</code> or <code class="constant">GL_PROXY_TEXTURE_CUBE_MAP</code> target to try out a resolution and
format. The implementation will
update and recompute its best match for the requested storage resolution
and format. To then query this state, call <a class="citerefentry" href="glGetTexLevelParameter"><span class="citerefentry"><span class="refentrytitle">glGetTexLevelParameter</span></span></a>.
If the texture cannot be accommodated, texture state is set to 0.
</p><p>
A one-component texture image uses only the red component of the RGBA
color extracted from <em class="parameter"><code>data</code></em>.
A two-component image uses the R and A values.
A three-component image uses the R, G, and B values.
A four-component image uses all of the RGBA components.
</p><p>
Depth textures can be treated as LUMINANCE, INTENSITY or ALPHA textures during texture filtering and application. Image-based shadowing can be enabled by comparing texture r coordinates to depth texture values to generate a boolean result. See <a class="citerefentry" href="glTexParameter"><span class="citerefentry"><span class="refentrytitle">glTexParameter</span></span></a> for details on texture comparison.
</p></div><div class="refsect1" lang="en" xml:lang="en"><a id="notes"></a><h2>Notes</h2><p>
Texturing has no effect in color index mode.
</p><p>
If the <code class="code">ARB_imaging</code> extension is supported, RGBA elements may
also be processed by the imaging pipeline. The following stages may be
applied to an RGBA color before color component clamping to the range
<math overflow="scroll">
<mfenced open="[" close="]">
<mn>0</mn>
<mn>1</mn>
</mfenced>
</math>:
</p><div class="variablelist"><dl><dt><span class="term">1. Color component replacement by the color table specified for</span></dt><dd><p>
<code class="constant">GL_COLOR_TABLE</code>, if enabled. See <a class="citerefentry" href="glColorTable"><span class="citerefentry"><span class="refentrytitle">glColorTable</span></span></a>.
</p></dd><dt><span class="term">2. Two-dimensional Convolution filtering, if enabled.</span></dt><dd><p>
See <a class="citerefentry" href="glConvolutionFilter1D"><span class="citerefentry"><span class="refentrytitle">glConvolutionFilter1D</span></span></a>.
</p><p>
If a convolution filter changes the <em class="parameter"><code>width</code></em> of the texture (by
processing with a <code class="constant">GL_CONVOLUTION_BORDER_MODE</code> of <code class="constant">GL_REDUCE</code>, for
example), and the GL does not support non-power-of-two textures, the <em class="parameter"><code>width</code></em> must
<math overflow="scroll">
<mrow>
<msup><mn>2</mn>
<mi mathvariant="italic">n</mi>
</msup>
<mo>+</mo>
<mrow>
<mn>2</mn>
<mo></mo>
<mfenced open="(" close=")">
<mi mathvariant="italic">border</mi>
</mfenced>
</mrow>
</mrow>
</math>,
for some
integer
<math overflow="scroll"><mi mathvariant="italic">n</mi></math>,
and <em class="parameter"><code>height</code></em> must be
<math overflow="scroll">
<mrow>
<msup><mn>2</mn>
<mi mathvariant="italic">m</mi>
</msup>
<mo>+</mo>
<mrow>
<mn>2</mn>
<mo></mo>
<mfenced open="(" close=")">
<mi mathvariant="italic">border</mi>
</mfenced>
</mrow>
</mrow>
</math>,
for some
integer
<math overflow="scroll"><mi mathvariant="italic">m</mi></math>,
after filtering.
</p></dd><dt><span class="term">3. RGBA components may be multiplied by <code class="constant">GL_POST_CONVOLUTION_c_SCALE</code>,</span></dt><dd><p>
and added to <code class="constant">GL_POST_CONVOLUTION_c_BIAS</code>, if enabled. See
<a class="citerefentry" href="glPixelTransfer"><span class="citerefentry"><span class="refentrytitle">glPixelTransfer</span></span></a>.
</p></dd><dt><span class="term">4. Color component replacement by the color table specified for</span></dt><dd><p>
<code class="constant">GL_POST_CONVOLUTION_COLOR_TABLE</code>, if enabled. See <a class="citerefentry" href="glColorTable"><span class="citerefentry"><span class="refentrytitle">glColorTable</span></span></a>.
</p></dd><dt><span class="term">5. Transformation by the color matrix.</span></dt><dd><p>
See <a class="citerefentry" href="glMatrixMode"><span class="citerefentry"><span class="refentrytitle">glMatrixMode</span></span></a>.
</p></dd><dt><span class="term">6. RGBA components may be multiplied by <code class="constant">GL_POST_COLOR_MATRIX_c_SCALE</code>,</span></dt><dd><p>
and added to <code class="constant">GL_POST_COLOR_MATRIX_c_BIAS</code>, if enabled. See
<a class="citerefentry" href="glPixelTransfer"><span class="citerefentry"><span class="refentrytitle">glPixelTransfer</span></span></a>.
</p></dd><dt><span class="term">7. Color component replacement by the color table specified for</span></dt><dd><p>
<code class="constant">GL_POST_COLOR_MATRIX_COLOR_TABLE</code>, if enabled. See <a class="citerefentry" href="glColorTable"><span class="citerefentry"><span class="refentrytitle">glColorTable</span></span></a>.
</p></dd></dl></div><p>
The texture image can be represented by the same data formats
as the pixels in a <a class="citerefentry" href="glDrawPixels"><span class="citerefentry"><span class="refentrytitle">glDrawPixels</span></span></a> command,
except that <code class="constant">GL_STENCIL_INDEX</code>
cannot be used.
<a class="citerefentry" href="glPixelStore"><span class="citerefentry"><span class="refentrytitle">glPixelStore</span></span></a> and <a class="citerefentry" href="glPixelTransfer"><span class="citerefentry"><span class="refentrytitle">glPixelTransfer</span></span></a> modes affect texture images
in exactly the way they affect <a class="citerefentry" href="glDrawPixels"><span class="citerefentry"><span class="refentrytitle">glDrawPixels</span></span></a>.
</p><p>
<code class="function">glTexImage2D</code> and <code class="constant">GL_PROXY_TEXTURE_2D</code> are available only if the GL
version is 1.1 or greater.
</p><p>
Internal formats other than 1, 2, 3, or 4 may be used only if the GL
version is 1.1 or greater.
</p><p>
In GL version 1.1 or greater, <em class="parameter"><code>data</code></em> may be a null pointer.
In this case, texture memory is
allocated to accommodate a texture of width <em class="parameter"><code>width</code></em> and height <em class="parameter"><code>height</code></em>.
You can then download subtextures to initialize this
texture memory.
The image is undefined if the user tries to apply
an uninitialized portion of the texture image to a primitive.
</p><p>
Formats <code class="constant">GL_BGR</code>, and <code class="constant">GL_BGRA</code> and types
<code class="constant">GL_UNSIGNED_BYTE_3_3_2</code>,
<code class="constant">GL_UNSIGNED_BYTE_2_3_3_REV</code>,
<code class="constant">GL_UNSIGNED_SHORT_5_6_5</code>,
<code class="constant">GL_UNSIGNED_SHORT_5_6_5_REV</code>,
<code class="constant">GL_UNSIGNED_SHORT_4_4_4_4</code>,
<code class="constant">GL_UNSIGNED_SHORT_4_4_4_4_REV</code>,
<code class="constant">GL_UNSIGNED_SHORT_5_5_5_1</code>,
<code class="constant">GL_UNSIGNED_SHORT_1_5_5_5_REV</code>,
<code class="constant">GL_UNSIGNED_INT_8_8_8_8</code>,
<code class="constant">GL_UNSIGNED_INT_8_8_8_8_REV</code>,
<code class="constant">GL_UNSIGNED_INT_10_10_10_2</code>, and
<code class="constant">GL_UNSIGNED_INT_2_10_10_10_REV</code> are available only if the GL version
is 1.2 or greater.
</p><p>
When the <code class="code">ARB_multitexture</code> extension is supported or the GL version is 1.3 or greater, <code class="function">glTexImage2D</code>
specifies the two-dimensional texture for the current texture unit,
specified with <a class="citerefentry" href="glActiveTexture"><span class="citerefentry"><span class="refentrytitle">glActiveTexture</span></span></a>.
</p><p>
<code class="constant">GL_TEXTURE_CUBE_MAP</code> and <code class="constant">GL_PROXY_TEXTURE_CUBE_MAP</code> are available only if the GL
version is 1.3 or greater.
</p><p>
<code class="constant">GL_DEPTH_COMPONENT</code>, <code class="constant">GL_DEPTH_COMPONENT16</code>,
<code class="constant">GL_DEPTH_COMPONENT24</code>, and <code class="constant">GL_DEPTH_COMPONENT32</code> are available only
if the GL version is 1.4 or greater.
</p><p>
Non-power-of-two textures are supported if the GL version is 2.0 or greater, or if the implementation exports the <code class="constant">GL_ARB_texture_non_power_of_two</code> extension.
</p><p>
The
<code class="constant">GL_SRGB</code>,
<code class="constant">GL_SRGB8</code>,
<code class="constant">GL_SRGB_ALPHA</code>,
<code class="constant">GL_SRGB8_ALPHA8</code>,
<code class="constant">GL_SLUMINANCE</code>,
<code class="constant">GL_SLUMINANCE8</code>,
<code class="constant">GL_SLUMINANCE_ALPHA</code>, and
<code class="constant">GL_SLUMINANCE8_ALPHA8</code>
internal formats are only available if the GL version is 2.1 or greater.
</p></div><div class="refsect1" lang="en" xml:lang="en"><a id="errors"></a><h2>Errors</h2><p>
<code class="constant">GL_INVALID_ENUM</code> is generated if <em class="parameter"><code>target</code></em> is not <code class="constant">GL_TEXTURE_2D</code>,
<code class="constant">GL_PROXY_TEXTURE_2D</code>,
<code class="constant">GL_PROXY_TEXTURE_CUBE_MAP</code>,
<code class="constant">GL_TEXTURE_CUBE_MAP_POSITIVE_X</code>,
<code class="constant">GL_TEXTURE_CUBE_MAP_NEGATIVE_X</code>,
<code class="constant">GL_TEXTURE_CUBE_MAP_POSITIVE_Y</code>,
<code class="constant">GL_TEXTURE_CUBE_MAP_NEGATIVE_Y</code>,
<code class="constant">GL_TEXTURE_CUBE_MAP_POSITIVE_Z</code>, or
<code class="constant">GL_TEXTURE_CUBE_MAP_NEGATIVE_Z</code>.
</p><p>
<code class="constant">GL_INVALID_ENUM</code> is generated if <em class="parameter"><code>target</code></em> is one of the six cube map 2D image targets and the width and height parameters are not equal.
</p><p>
<code class="constant">GL_INVALID_ENUM</code> is generated if <em class="parameter"><code>type</code></em> is not a type constant.
</p><p>
<code class="constant">GL_INVALID_ENUM</code> is generated if <em class="parameter"><code>type</code></em> is <code class="constant">GL_BITMAP</code> and
<em class="parameter"><code>format</code></em> is not <code class="constant">GL_COLOR_INDEX</code>.
</p><p>
<code class="constant">GL_INVALID_VALUE</code> is generated if <em class="parameter"><code>width</code></em> or <em class="parameter"><code>height</code></em> is less than 0
or greater than 2 + <code class="constant">GL_MAX_TEXTURE_SIZE</code>.
</p><p>
<code class="constant">GL_INVALID_VALUE</code> is generated if <em class="parameter"><code>level</code></em> is less than 0.
</p><p>
<code class="constant">GL_INVALID_VALUE</code> may be generated if <em class="parameter"><code>level</code></em> is greater than
<math overflow="scroll">
<mrow>
<msub><mi mathvariant="italic">log</mi>
<mn>2</mn>
</msub>
<mo></mo>
<mfenced open="(" close=")">
<mi mathvariant="italic">max</mi>
</mfenced>
</mrow>
</math>,
where <span class="emphasis"><em>max</em></span> is the returned value of <code class="constant">GL_MAX_TEXTURE_SIZE</code>.
</p><p>
<code class="constant">GL_INVALID_VALUE</code> is generated if <em class="parameter"><code>internalFormat</code></em> is not 1, 2, 3, 4, or one of the
accepted resolution and format symbolic constants.
</p><p>
<code class="constant">GL_INVALID_VALUE</code> is generated if <em class="parameter"><code>width</code></em> or <em class="parameter"><code>height</code></em> is less than 0
or greater than 2 + <code class="constant">GL_MAX_TEXTURE_SIZE</code>.
</p><p>
<code class="constant">GL_INVALID_VALUE</code> is generated if non-power-of-two textures are not supported and the <em class="parameter"><code>width</code></em> or <em class="parameter"><code>height</code></em> cannot be represented as
<math overflow="scroll">
<mrow>
<msup><mn>2</mn>
<mi mathvariant="italic">k</mi>
</msup>
<mo>+</mo>
<mrow>
<mn>2</mn>
<mo></mo>
<mfenced open="(" close=")">
<mi mathvariant="italic">border</mi>
</mfenced>
</mrow>
</mrow>
</math>
for some
integer value of <span class="emphasis"><em>k</em></span>.
</p><p>
<code class="constant">GL_INVALID_VALUE</code> is generated if <em class="parameter"><code>border</code></em> is not 0 or 1.
</p><p>
<code class="constant">GL_INVALID_OPERATION</code> is generated if <em class="parameter"><code>type</code></em> is one of
<code class="constant">GL_UNSIGNED_BYTE_3_3_2</code>,
<code class="constant">GL_UNSIGNED_BYTE_2_3_3_REV</code>,
<code class="constant">GL_UNSIGNED_SHORT_5_6_5</code>, or
<code class="constant">GL_UNSIGNED_SHORT_5_6_5_REV</code>
and <em class="parameter"><code>format</code></em> is not <code class="constant">GL_RGB</code>.
</p><p>
<code class="constant">GL_INVALID_OPERATION</code> is generated if <em class="parameter"><code>type</code></em> is one of
<code class="constant">GL_UNSIGNED_SHORT_4_4_4_4</code>,
<code class="constant">GL_UNSIGNED_SHORT_4_4_4_4_REV</code>,
<code class="constant">GL_UNSIGNED_SHORT_5_5_5_1</code>,
<code class="constant">GL_UNSIGNED_SHORT_1_5_5_5_REV</code>,
<code class="constant">GL_UNSIGNED_INT_8_8_8_8</code>,
<code class="constant">GL_UNSIGNED_INT_8_8_8_8_REV</code>,
<code class="constant">GL_UNSIGNED_INT_10_10_10_2</code>, or
<code class="constant">GL_UNSIGNED_INT_2_10_10_10_REV</code>
and <em class="parameter"><code>format</code></em> is neither <code class="constant">GL_RGBA</code> nor <code class="constant">GL_BGRA</code>.
</p><p>
<code class="constant">GL_INVALID_OPERATION</code> is generated if <em class="parameter"><code>target</code></em> is not
<code class="constant">GL_TEXTURE_2D</code> or <code class="constant">GL_PROXY_TEXTURE_2D</code> and <em class="parameter"><code>internalFormat</code></em> is
<code class="constant">GL_DEPTH_COMPONENT</code>, <code class="constant">GL_DEPTH_COMPONENT16</code>,
<code class="constant">GL_DEPTH_COMPONENT24</code>, or <code class="constant">GL_DEPTH_COMPONENT32</code>.
</p><p>
<code class="constant">GL_INVALID_OPERATION</code> is generated if <em class="parameter"><code>format</code></em> is
<code class="constant">GL_DEPTH_COMPONENT</code> and <em class="parameter"><code>internalFormat</code></em> is not
<code class="constant">GL_DEPTH_COMPONENT</code>, <code class="constant">GL_DEPTH_COMPONENT16</code>,
<code class="constant">GL_DEPTH_COMPONENT24</code>, or <code class="constant">GL_DEPTH_COMPONENT32</code>.
</p><p>
<code class="constant">GL_INVALID_OPERATION</code> is generated if <em class="parameter"><code>internalFormat</code></em> is
<code class="constant">GL_DEPTH_COMPONENT</code>, <code class="constant">GL_DEPTH_COMPONENT16</code>,
<code class="constant">GL_DEPTH_COMPONENT24</code>, or <code class="constant">GL_DEPTH_COMPONENT32</code>, and <em class="parameter"><code>format</code></em> is
not <code class="constant">GL_DEPTH_COMPONENT</code>.
</p><p>
<code class="constant">GL_INVALID_OPERATION</code> is generated if a non-zero buffer object name is bound to the
<code class="constant">GL_PIXEL_UNPACK_BUFFER</code> target and the buffer object's data store is currently mapped.
</p><p>
<code class="constant">GL_INVALID_OPERATION</code> is generated if a non-zero buffer object name is bound to the
<code class="constant">GL_PIXEL_UNPACK_BUFFER</code> target and the data would be unpacked from the buffer
object such that the memory reads required would exceed the data store size.
</p><p>
<code class="constant">GL_INVALID_OPERATION</code> is generated if a non-zero buffer object name is bound to the
<code class="constant">GL_PIXEL_UNPACK_BUFFER</code> target and <em class="parameter"><code>data</code></em> is not evenly divisible
into the number of bytes needed to store in memory a datum indicated by <em class="parameter"><code>type</code></em>.
</p><p>
<code class="constant">GL_INVALID_OPERATION</code> is generated if <code class="function">glTexImage2D</code>
is executed between the execution of <a class="citerefentry" href="glBegin"><span class="citerefentry"><span class="refentrytitle">glBegin</span></span></a>
and the corresponding execution of <a class="citerefentry" href="glEnd"><span class="citerefentry"><span class="refentrytitle">glEnd</span></span></a>.
</p></div><div class="refsect1" lang="en" xml:lang="en"><a id="associatedgets"></a><h2>Associated Gets</h2><p>
<a class="citerefentry" href="glGetTexImage"><span class="citerefentry"><span class="refentrytitle">glGetTexImage</span></span></a>
</p><p>
<a class="citerefentry" href="glIsEnabled"><span class="citerefentry"><span class="refentrytitle">glIsEnabled</span></span></a> with argument <code class="constant">GL_TEXTURE_2D</code> or <code class="constant">GL_TEXTURE_CUBE_MAP</code>
</p><p>
<a class="citerefentry" href="glGet"><span class="citerefentry"><span class="refentrytitle">glGet</span></span></a> with argument <code class="constant">GL_PIXEL_UNPACK_BUFFER_BINDING</code>
</p></div>
{$pipelinestall}{$examples}
<div class="refsect1" lang="en" xml:lang="en"><a id="seealso"></a><h2>See Also</h2><p>
<a class="citerefentry" href="glActiveTexture"><span class="citerefentry"><span class="refentrytitle">glActiveTexture</span></span></a>,
<a class="citerefentry" href="glColorTable"><span class="citerefentry"><span class="refentrytitle">glColorTable</span></span></a>,
<a class="citerefentry" href="glConvolutionFilter2D"><span class="citerefentry"><span class="refentrytitle">glConvolutionFilter2D</span></span></a>,
<a class="citerefentry" href="glCopyPixels"><span class="citerefentry"><span class="refentrytitle">glCopyPixels</span></span></a>,
<a class="citerefentry" href="glCopyTexImage1D"><span class="citerefentry"><span class="refentrytitle">glCopyTexImage1D</span></span></a>,
<a class="citerefentry" href="glCopyTexImage2D"><span class="citerefentry"><span class="refentrytitle">glCopyTexImage2D</span></span></a>,
<a class="citerefentry" href="glCopyTexSubImage1D"><span class="citerefentry"><span class="refentrytitle">glCopyTexSubImage1D</span></span></a>,
<a class="citerefentry" href="glCopyTexSubImage2D"><span class="citerefentry"><span class="refentrytitle">glCopyTexSubImage2D</span></span></a>,
<a class="citerefentry" href="glCopyTexSubImage3D"><span class="citerefentry"><span class="refentrytitle">glCopyTexSubImage3D</span></span></a>,
<a class="citerefentry" href="glDrawPixels"><span class="citerefentry"><span class="refentrytitle">glDrawPixels</span></span></a>,
<a class="citerefentry" href="glMatrixMode"><span class="citerefentry"><span class="refentrytitle">glMatrixMode</span></span></a>,
<a class="citerefentry" href="glPixelStore"><span class="citerefentry"><span class="refentrytitle">glPixelStore</span></span></a>,
<a class="citerefentry" href="glPixelTransfer"><span class="citerefentry"><span class="refentrytitle">glPixelTransfer</span></span></a>,
<a class="citerefentry" href="glSeparableFilter2D"><span class="citerefentry"><span class="refentrytitle">glSeparableFilter2D</span></span></a>,
<a class="citerefentry" href="glTexEnv"><span class="citerefentry"><span class="refentrytitle">glTexEnv</span></span></a>,
<a class="citerefentry" href="glTexGen"><span class="citerefentry"><span class="refentrytitle">glTexGen</span></span></a>,
<a class="citerefentry" href="glTexImage1D"><span class="citerefentry"><span class="refentrytitle">glTexImage1D</span></span></a>,
<a class="citerefentry" href="glTexImage3D"><span class="citerefentry"><span class="refentrytitle">glTexImage3D</span></span></a>,
<a class="citerefentry" href="glTexSubImage1D"><span class="citerefentry"><span class="refentrytitle">glTexSubImage1D</span></span></a>,
<a class="citerefentry" href="glTexSubImage2D"><span class="citerefentry"><span class="refentrytitle">glTexSubImage2D</span></span></a>,
<a class="citerefentry" href="glTexSubImage3D"><span class="citerefentry"><span class="refentrytitle">glTexSubImage3D</span></span></a>,
<a class="citerefentry" href="glTexParameter"><span class="citerefentry"><span class="refentrytitle">glTexParameter</span></span></a>
</p></div><div class="refsect1" lang="en" xml:lang="en"><div id="Copyright"><h2>Copyright</h2><p>
Copyright © 1991-2006
Silicon Graphics, Inc. This document is licensed under the SGI
Free Software B License. For details, see
<a class="ulink" href="https://web.archive.org/web/20171022161616/http://oss.sgi.com/projects/FreeB/" target="_top">https://web.archive.org/web/20171022161616/http://oss.sgi.com/projects/FreeB/</a>.
</p></div></div></div>