• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1Name
2
3     EXT_texture_cube_map
4
5Name Strings
6
7     GL_EXT_texture_cube_map
8
9Version
10
11    August 19, 1999
12
13Number
14
15    ??
16
17Dependencies
18
19    None.
20
21    Written based on the wording of the OpenGL 1.2 specification but
22    not dependent on it.
23
24Overview
25
26    This extension provides a new texture generation scheme for cube
27    map textures.  Instead of the current texture providing a 1D, 2D,
28    or 3D lookup into a 1D, 2D, or 3D texture image, the texture is a
29    set of six 2D images representing the faces of a cube.  The (s,t,r)
30    texture coordinates are treated as a direction vector emanating from
31    the center of a cube.  At texture generation time, the interpolated
32    per-fragment (s,t,r) selects one cube face 2D image based on the
33    largest magnitude coordinate (the major axis).  A new 2D (s,t) is
34    calculated by dividing the two other coordinates (the minor axes
35    values) by the major axis value.  Then the new (s,t) is used to
36    lookup into the selected 2D texture image face of the cube map.
37
38    Unlike a standard 1D, 2D, or 3D texture that have just one target,
39    a cube map texture has six targets, one for each of its six 2D texture
40    image cube faces.  All these targets must be consistent, complete,
41    and have a square dimension.
42
43    This extension also provides two new texture coordinate generation modes
44    for use in conjunction with cube map texturing.  The reflection map
45    mode generates texture coordinates (s,t,r) matching the vertex's
46    eye-space reflection vector.  The reflection map mode
47    is useful for environment mapping without the singularity inherent
48    in sphere mapping.  The normal map mode generates texture coordinates
49    (s,t,r) matching the vertex's transformed eye-space
50    normal.  The normal map mode is useful for sophisticated cube
51    map texturing-based diffuse lighting models.
52
53    The intent of the new texgen functionality is that an application using
54    cube map texturing can use the new texgen modes to automatically
55    generate the reflection or normal vectors used to look up into the
56    cube map texture.
57
58    An application note:  When using cube mapping with dynamic cube
59    maps (meaning the cube map texture is re-rendered every frame),
60    by keeping the cube map's orientation pointing at the eye position,
61    the texgen-computed reflection or normal vector texture coordinates
62    can be always properly oriented for the cube map.  However if the
63    cube map is static (meaning that when view changes, the cube map
64    texture is not updated), the texture matrix must be used to rotate
65    the computed texgen-computed reflection or normal vector texture
66    coordinates to match the orientation of the cube map.  The rotation
67    can be computed based on two vectors: 1) the direction vector from
68    the cube map center to the eye position (both in world coordinates),
69    and 2) the cube map orientation in world coordinates.  The axis of
70    rotation is the cross product of these two vectors; the angle of
71    rotation is the arcsin of the dot product of these two vectors.
72
73Issues
74
75    Should we place the normal/reflection vector in the (s,t,r) texture
76    coordinates or (s,t,q) coordinates?
77
78      RESOLUTION:  (s,t,r).  Even if the proposed hardware uses "q" for
79      the third component, the API should claim to support generation of
80      (s,t,r) and let the texture matrix (through a concatenation with
81      the user-supplied texture matrix) move "r" into "q".
82
83    Should the texture coordinate generation functionality for cube
84    mapping be specified as a distinct extension from the actual cube
85    map texturing functionality.
86
87      RESOLUTION:  NO.  Real applications and real implementations of
88      cube mapping will tie the texgen and texture generation functionality
89      together.  One isn't very useful without the other.
90
91      While applications will almost always want to use the texgen
92      functionality for automatically generating the reflection or normal
93      vector as texture coordinates (s,t,r), this extension does permit
94      an application to manually supply the reflection or normal vector
95      through glTexCoord3f explicitly.
96
97    Should you be able to have some texture coordinates computing
98    REFLECTION_MAP_EXT and others not?  Same question with NORMAL_MAP_EXT.
99
100      RESOLUTION:  YES. This is the way that SPHERE_MAP works.  It is
101      not clear that this would ever be useful though.
102
103    Should something special be said about the handling of the q
104    texture coordinate for this spec?
105
106      RESOLUTION:  NO.  But the following paragraph is useful for
107      implementors concerned about the handling of q.
108
109      The REFLECTION_MAP_EXT and NORMAL_MAP_EXT modes are intended to supply
110      reflection and normal vectors for cube map texturing hardware.
111      When these modes are used for cube map texturing, the generated
112      texture coordinates can be thought of as an reflection vector.
113      The value of the q texture coordinate then simply scales the
114      vector but does not change its direction.  Because only the vector
115      direction (not the vector magnitude) matters for cube map texturing,
116      implementations are free to leave q undefined when any of the s,
117      t, or r texture coordinates are generated using REFLECTION_MAP_EXT
118      or NORMAL_MAP_EXT.
119
120      For the proposed hardware, there is not an r texture coordinate
121      datapath (since 3D texturing is not supported) so the cube map
122      texturing block uses the q datapath for passing r in cube map
123      texturing mode.  This means that when cube map texturing (the
124      texturing functionality, not the texgen functionality) is enabled,
125      the OpenGL implementation must use the texture matrix to switch the
126      outputted r and q.
127
128    How should the cube faces be labeled?
129
130      RESOLUTION:  Match the render man specification's names of "px"
131      (positive X), "nx" (negative x), "py", "ny", "pz", and "nz".
132      There does not actually need to be an "ordering for the faces"
133      (Direct3D 7.0 does number their cube map faces.)  For this
134      extension, the symbolic target names (TEXTURE_CUBE_MAP_POSITIVE_X,
135      etc) is sufficient without requiring any specific ordering.
136
137    What coordinate system convention should be used?  LHS or RHS?
138
139      RESOLUTION:  The coordinate system is left-handed if you think
140      of yourself within the cube.  The coordinate system is
141      right-handed if you think of yourself outside the cube.
142
143      This matches the convention of the RenderMan interface.  If
144      you look at Figure 12.8 (page 265) in "The RenderMan Companion",
145      think of the cube being folded up with the observer inside
146      the cube.  Then the coordinate system convention is
147      left-handed.
148
149    We plan on interpolating the reflection vectors computed per-vertex
150    across polygons in the proposed hardware.  Is there a problem
151    interpolating reflection vectors in this way?
152
153      Probably.  The better approach would be to interpolate the eye
154      vector and normal vector over the polygon and perform the reflection
155      vector computation on a per-fragment basis.  Not doing so is likely
156      to lead to artifacts because angular changes in the normal vector
157      result in twice as large a change in the reflection vector as normal
158      vector changes.  The effect is likely to be reflections that become
159      glancing reflections too fast over the surface of the polygon.
160
161      Note that this is an issue for REFLECTION_MAP_EXT, but not
162      NORMAL_MAP_EXT.
163
164    What happens if an (s,t,q) is passed to cube map generation that
165    is close to (0,0,0), ie. a degenerate direction vector?
166
167      RESOLUTION:  Leave undefined what happens in this case (but
168      may not lead to GL interruption or termination).
169
170      Note that a vector close to (0,0,0) may be generated as a
171      result of the per-fragment interpolation of (s,t,r) between
172      vertices.
173
174    Do we need a distinct proxy texture mechanism for cube map
175    textures?
176
177      RESOLUTION:  YES.  Cube map textures take up six times the
178      memory as a conventional 2D image texture so proxy 2D texture
179      determinations won't be of value for a cube map texture.
180      Cube maps need their own proxy target.
181
182    Should we require the 2D texture image width and height to
183    be identical (ie, square only)?
184
185      RESOLUTION:  YES.  The proposed hardware has this limitation
186      and it is quite a reasonable limitation anyway!
187
188      This restriction is enforced by generating an INVALID_VALUE
189      when calling TexImage2D or CopyTexImage2D with a non-equal
190      width and height.
191
192      Some consideration was given to enforcing the "squarness"
193      constraint as a texture consistency constraint.  This is
194      confusing however since the squareness is known up-front
195      at texture image specification time so it seems confusing
196      to silently report the usage error as a texture consistency
197      issue.
198
199      Texture consistency still says that all the level 0 textures
200      of all six faces must have the same square size.
201
202    If some combination of 1D, 2D, 3D, and cube map texturing is
203    enabled, which really operates?
204
205      RESOLUTION:  Cube map texturing.  In OpenGL 1.2, 3D takes
206      priority over 2D takes priority over 1D.  Cube mapping should
207      take priority over all conventional n-dimensional texturing
208      schemes.
209
210    Does anything need to be said about combining cube mapping with
211    multitexture?
212
213      RESOLUTION:  NO.  Cube mapping should be available on either
214      texture unit in the proposed hardware.  The proposed hardware is
215      fully orthogonal in its handling of cube map textures.
216
217    Does it make sense to support borders for cube map textures.
218
219      Actually, it does, but that still doesn't mean that the proposed
220      hardware is going to support texture borders -- let alone texture
221      borders for cube map textures.  It would be nice if the texture
222      border pixels match the appropriate texels from the edges of the
223      other cube map faces that they junction with.  For this reason,
224      we'll leave the texture border capability implicitly supported.
225
226    How does mipmap level-of-detail selection work for cube map
227    textures?
228
229      The spec should document the "ideal" level-of-detail selection even
230      if the proposed hardware cuts corners in this area.  The existing
231      spec's language about LOD selection is fine.
232
233      For the proposed hardware, it approximates the LOD across the cube
234      map seam, but everywhere else it is as accurate as regular texture
235      maps.
236
237    Should the implementation dependent value for the maximum
238    texture size for a cube map be the same as MAX_TEXTURE_SIZE?
239
240      RESOLUTION: NO.  OpenGL 1.2 has a different MAX_3D_TEXTURE_SIZE
241      for 3D textures, and cube maps should take six times more space
242      than a 2D texture map of the same width & height.  The implementation
243      dependent MAX_CUBE_MAP_TEXTURE_SIZE_EXT constant should be used for
244      cube maps then.
245
246      Note that the proxy cube map texture provides a better way to
247      find out the maximum cube map texture size supported since the
248      proxy mechanism can take into account the internal format, etc.
249
250New Procedures and Functions
251
252    None
253
254New Tokens
255
256    Accepted by the <param> parameters of TexGend, TexGenf, and TexGeni
257    when <pname> parameter is TEXTURE_GEN_MODE:
258
259        NORMAL_MAP_EXT                      0x8511
260        REFLECTION_MAP_EXT                  0x8512
261
262    When the <pname> parameter of TexGendv, TexGenfv, and TexGeniv is
263    TEXTURE_GEN_MODE, then the array <params> may also contain
264    NORMAL_MAP_EXT or REFLECTION_MAP_EXT.
265
266    Accepted by the <cap> parameter of Enable, Disable, IsEnabled, and
267    by the <pname> parameter of GetBooleanv, GetIntegerv, GetFloatv,
268    and GetDoublev, and by the <target> parameter of BindTexture,
269    GetTexParameterfv, GetTexParameteriv, TexParameterf, TexParameteri,
270    TexParameterfv, and TexParameteriv:
271
272        TEXTURE_CUBE_MAP_EXT                0x8513
273
274    Accepted by the <pname> parameter of GetBooleanv, GetIntegerv,
275    GetFloatv, and GetDoublev:
276
277        TEXTURE_BINDING_CUBE_MAP_EXT        0x8514
278
279    Accepted by the <target> parameter of GetTexImage,
280    GetTexLevelParameteriv, GetTexLevelParameterfv, TexImage2D,
281    CopyTexImage2D, TexSubImage2D, and CopySubTexImage2D:
282
283        TEXTURE_CUBE_MAP_POSITIVE_X_EXT     0x8515
284        TEXTURE_CUBE_MAP_NEGATIVE_X_EXT     0x8516
285        TEXTURE_CUBE_MAP_POSITIVE_Y_EXT     0x8517
286        TEXTURE_CUBE_MAP_NEGATIVE_Y_EXT     0x8518
287        TEXTURE_CUBE_MAP_POSITIVE_Z_EXT     0x8519
288        TEXTURE_CUBE_MAP_NEGATIVE_Z_EXT     0x851a
289
290    Accepted by the <target> parameter of GetTexLevelParameteriv,
291    GetTexLevelParameterfv, GetTexParameteriv, and TexImage2D:
292
293        PROXY_TEXTURE_CUBE_MAP_EXT          0x851b
294
295    Accepted by the <pname> parameter of GetBooleanv, GetDoublev,
296    GetIntegerv, and GetFloatv:
297
298        MAX_CUBE_MAP_TEXTURE_SIZE_EXT       0x851c
299
300Additions to Chapter 2 of the 1.2 Specification (OpenGL Operation)
301
302 --  Section 2.10.4 "Generating Texture Coordinates"
303
304      Change the last sentence in the 1st paragraph to:
305
306      "If <pname> is TEXTURE_GEN_MODE, then either <params> points to or <param> is
307      an integer that is one of the symbolic constants OBJECT_LINEAR,
308      EYE_LINEAR, SPHERE_MAP, REFLECTION_MAP_EXT, or NORMAL_MAP_EXT."
309
310      Add these paragraphs after the 4th paragraph:
311
312      "If TEXTURE_GEN_MODE indicates REFLECTION_MAP_EXT, compute the reflection
313      vector r as described for the SPHERE_MAP mode.  Then the value assigned
314      to an s coordinate (the first TexGen argument value is S) is s = rx; the
315      value assigned to a t coordinate is t = ry; and the value assigned to a r
316      coordinate is r = rz.  Calling TexGen with a <coord> of Q when <pname>
317      indicates REFLECTION_MAP_EXT generates the error INVALID_ENUM.
318
319      If TEXTURE_GEN_MODE indicates NORMAL_MAP_EXT, compute the normal
320      vector n' as described in section 2.10.3.  Then the value assigned to an
321      s coordinate (the first TexGen argument value is S) is s = nx'; the value
322      assigned to a t coordinate is t = ny'; and the value assigned to a r coordinate
323      is r = nz'.  Calling TexGen with a <coord> of Q when <pname> indicates
324      REFLECTION_MAP_EXT generates the error INVALID_ENUM.
325
326      The last paragraph's first sentence should be changed to:
327
328      "The state required for texture coordinate generation comprises a
329      five-valued integer for each coordinate indicating coordinate
330      generation mode, ..."
331
332Additions to Chapter 3 of the 1.2 Specification (Rasterization)
333
334 --  Section 3.6.5 "Pixel Transfer Operations" under "Convolution"
335
336     Change this paragraph to say:
337
338     ... "If CONVOLUTION_2D is enabled, the two-dimensional convolution
339     filter is applied only to the two-dimensional images passed to
340     DrawPixels, CopyPixels, ReadPixels, TexImage2D, TexSubImage2D,
341     CopyTexImage2D, CopyTexSubImage2D, and CopyTexSubImage3D, and
342     returned by GetTexImage with one of the targets TEXTURE_2D,
343     TEXTURE_CUBE_MAP_POSITIVE_X_EXT, TEXTURE_CUBE_MAP_NEGATIVE_X_EXT,
344     TEXTURE_CUBE_MAP_POSITIVE_Y_EXT, TEXTURE_CUBE_MAP_NEGATIVE_Y_EXT,
345     TEXTURE_CUBE_MAP_POSITIVE_Z_EXT, or TEXTURE_CUBE_MAP_NEGATIVE_Z_EXT."
346
347 --  Section 3.8.1 "Texture Image Specification"
348
349     Change the first full sentence on page 117 to:
350
351     "<target> must be one of TEXTURE_2D for a 2D texture, or one of
352     TEXTURE_CUBE_MAP_POSITIVE_X_EXT, TEXTURE_CUBE_MAP_NEGATIVE_X_EXT,
353     TEXTURE_CUBE_MAP_POSITIVE_Y_EXT, TEXTURE_CUBE_MAP_NEGATIVE_Y_EXT,
354     TEXTURE_CUBE_MAP_POSITIVE_Z_EXT, or TEXTURE_CUBE_MAP_NEGATIVE_Z_EXT
355     for a cube map texture.  Additionally, <target> can be either
356     PROXY_TEXTURE_2D for a 2D proxy texture or PROXY_TEXTURE_CUBE_MAP_EXT
357     for a cube map proxy texture as discussed in section 3.8.7."
358
359     Add the following paragraphs after the first paragraph on page 117:
360
361     "A 2D texture consists of a single 2D texture image.  A cube
362     map texture is a set of six 2D texture images.  The six cube map
363     texture targets form a single cube map texture though each target
364     names a distinct face of the cube map.  The TEXTURE_CUBE_MAP_*_EXT
365     targets listed above update their appropriate cube map face 2D
366     texture image.  Note that the six cube map 2D image tokens such as
367     TEXTURE_CUBE_MAP_POSITIVE_X_EXT are used when specifying, updating,
368     or querying, one of a cube map's six 2D image, but when enabling
369     cube map texturing or binding to a cube map texture object (that is
370     when the cube map is accessed as a whole as opposed to a particular
371     2D image), the TEXTURE_CUBE_MAP_EXT token is specified.
372
373     When the target parameter to TexImage2D is one of the six cube map
374     2D image targets, the error INVALID_VALUE is generated if the width
375     and height parameters are not equal.
376
377     If cube map texturing is enabled at the time a primitive is
378     rasterized and if the set of six targets are not "cube complete",
379     then it is as if texture mapping were disabled.  The targets of
380     a cube map texture are "cube complete" if the array 0 of all six
381     targets have identical and square dimensions, the array 0 of all
382     six targets were specified with the same symbolic constant, and
383     the array 0 of all six targets have the same border width."
384
385     After the 14th paragraph add:
386
387     "In a similiar fashion, the maximum allowable width and height
388     (they must be the same) of a cube map texture must be at least
389     2^(k-lod)+2bt for image arrays level 0 through k, where k is the
390     log base 2 of MAX_CUBE_MAP_TEXTURE_EXT."
391
392 --  Section 3.8.2 "Alternate Texture Image Specification Commands"
393
394     Update the second paragraph (page 120) to say:
395
396     ... "Currently, <target> must be
397     TEXTURE_2D, TEXTURE_CUBE_MAP_POSITIVE_X_EXT,
398     TEXTURE_CUBE_MAP_NEGATIVE_X_EXT, TEXTURE_CUBE_MAP_POSITIVE_Y_EXT,
399     TEXTURE_CUBE_MAP_NEGATIVE_Y_EXT, TEXTURE_CUBE_MAP_POSITIVE_Z_EXT,
400     or TEXTURE_CUBE_MAP_NEGATIVE_Z_EXT." ...
401
402     Add after the second paragraph (page 120), the following:
403
404     "When the target parameter to CopyTexImage2D is one of the six cube
405     map 2D image targets, the error INVALID_VALUE is generated if the
406     width and height parameters are not equal."
407
408     Update the fourth paragraph (page 121) to say:
409
410     ... "Currently the target arguments of TexSubImage1D and
411     CopyTexSubImage1D must be TEXTURE_1D, the <target> arguments of
412     TexSubImage2D and CopyTexSubImage2D must be one of TEXTURE_2D,
413     TEXTURE_CUBE_MAP_POSITIVE_X_EXT, TEXTURE_CUBE_MAP_NEGATIVE_X_EXT,
414     TEXTURE_CUBE_MAP_POSITIVE_Y_EXT, TEXTURE_CUBE_MAP_NEGATIVE_Y_EXT,
415     TEXTURE_CUBE_MAP_POSITIVE_Z_EXT, or TEXTURE_CUBE_MAP_NEGATIVE_Z_EXT,
416     and the <target> arguments of TexSubImage3D and CopyTexSubImage3D
417     must be TEXTURE_3D." ...
418
419 --  Section 3.8.3 "Texture Parameters"
420
421     Change paragraph one (page 124) to say:
422
423     ... "<target> is the target, either TEXTURE_1D,
424     TEXTURE_2D, TEXTURE_3D, or TEXTURE_CUBE_MAP_EXT." ...
425
426     Add a final paragraph saying:
427
428     "Texture parameters for a cube map texture apply to cube map
429     as a whole; the six distinct 2D texture images use the
430     texture parameters of the cube map itself.
431
432 --  Section 3.8.5 "Texture Minification" under "Mipmapping"
433
434     Change the first full paragraph on page 130 to:
435
436     ... "If texturing is enabled for one-, two-, or three-dimensional
437     texturing but not cube map texturing (and TEXTURE_MIN_FILTER
438     is one that requires a mipmap) at the time a primitive is
439     rasterized and if the set of arrays TEXTURE_BASE_LEVEL through q =
440     min{p,TEXTURE_MAX_LEVEL} is incomplete, based on the dimensions of
441     array 0, then it is as if texture mapping were disabled."
442
443     Follow the first full paragraph on page 130 with:
444
445     "If cube map texturing is enabled and TEXTURE_MIN_FILTER is one that
446     requires mipmap levels at the time a primitive is rasterized and
447     if the set of six targets are not "mipmap cube complete", then it
448     is as if texture mapping were disabled.  The targets of a cube map
449     texture are "mipmap cube complete" if the six cube map targets are
450     "cube complete" and the set of arrays TEXTURE_BASE_LEVEL through
451     q are not incomplete (as described above)."
452
453 --  Section 3.8.7 "Texture State and Proxy State"
454
455     Change the first sentence of the first paragraph (page 131) to say:
456
457     "The state necessary for texture can be divided into two categories.
458     First, there are the nine sets of mipmap arrays (three for the one-,
459     two-, and three-dimensional texture targets and six for the cube
460     map texture targets) and their number." ...
461
462     Change the second paragraph (page 132) to say:
463
464     "In addition to the one-, two-, three-dimensional, and the six cube
465     map sets of image arrays, the partially instantiated one-, two-,
466     and three-dimensional and one cube map sets of proxy image arrays
467     are maintained." ...
468
469     After the third paragraph (page 132) add:
470
471     "The cube map proxy arrays are operated on in the same manner
472     when TexImage2D is executed with the <target> field specified as
473     PROXY_TEXTURE_CUBE_MAP_EXT with the addition that determining that a
474     given cube map texture is supported with PROXY_TEXTURE_CUBE_MAP_EXT
475     indicates that all six of the cube map 2D images are supported.
476     Likewise, if the specified PROXY_TEXTURE_CUBE_MAP_EXT is not
477     supported, none of the six cube map 2D images are supported."
478
479     Change the second sentence of the fourth paragraph (page 132) to:
480
481     "Therefore PROXY_TEXTURE_1D, PROXY_TEXTURE_2D, PROXY_TEXTURE_3D,
482     and PROXY_TEXTURE_CUBE_MAP_EXT cannot be used as textures, and their
483     images must never be queried using GetTexImage." ...
484
485 --  Section 3.8.8 "Texture Objects"
486
487     Change the first sentence of paragraph one (page 133) to say:
488
489     "In addition to the default textures TEXTURE_1D, TEXTURE_2D,
490     TEXTURE_3D, and TEXTURE_CUBE_MAP_EXT, named one-, two-,
491     and three-dimensional texture objects and cube map texture objects
492     can be created and operated on." ...
493
494     Change the second paragraph (page 133) to say:
495
496     "A texture object is created by binding an unused name to
497     TEXTURE_1D, TEXTURE_2D, TEXTURE_3D, or TEXTURE_CUBE_MAP_EXT." ...
498     "If the new texture object is bound to TEXTURE_1D, TEXTURE_2D,
499     TEXTURE_3D, or TEXTURE_CUBE_MAP_EXT, it remains a one-, two-,
500     three-dimensional, or cube map texture until it is deleted."
501
502     Change the third paragraph (page 133) to say:
503
504     "BindTexture may also be used to bind an existing texture object to
505     either TEXTURE_1D, TEXTURE_2D, TEXTURE_3D, or TEXTURE_CUBE_MAP_EXT."
506
507     Change paragraph five (page 133) to say:
508
509     "In the initial state, TEXTURE_1D, TEXTURE_2D, TEXTURE_3D,
510     and TEXTURE_CUBE_MAP have one-dimensional, two-dimensional,
511     three-dimensional, and cube map state vectors associated
512     with them respectively."  ...  "The initial, one-dimensional,
513     two-dimensional, three-dimensional, and cube map texture is therefore
514     operated upon, queried, and applied as TEXTURE_1D, TEXTUER_2D,
515     TEXTURE_3D, and TEXTURE_CUBE_MAP_EXT respectively while 0 is bound
516     to the corresponding targets."
517
518     Change paragraph six (page 134) to say:
519
520     ... "If a texture that is currently bound to one of the targets
521     TEXTURE_1D, TEXTURE_2D, TEXTURE_3D, or TEXTURE_CUBE_MAP_EXT is
522     deleted, it is as though BindTexture has been executed with the
523     same <target> and <texture> zero." ...
524
525 --  Section 3.8.10 "Texture Application"
526
527     Replace the beginning sentences of the first paragraph (page 136)
528     with:
529
530     "Texturing is enabled or disabled using the generic Enable
531     and Disable commands, respectively, with the symbolic constants
532     TEXTURE_1D, TEXTURE_2D, TEXTURE_3D, or TEXTURE_CUBE_MAP_EXT to enable
533     the one-dimensional, two-dimensional, three-dimensional, or cube
534     map texturing respectively.  If both two- and one-dimensional
535     textures are enabled, the two-dimensional texture is used.  If the
536     three-dimensional and either of the two- or one-dimensional textures
537     is enabled, the three-dimensional texture is used.  If the cube map
538     texture and any of the three-, two-, or one-dimensional textures is
539     enabled, then cube map texturing is used.  If texturing is disabled,
540     a rasterized fragment is passed on unaltered to the next stage of the
541     GL (although its texture coordinates may be discarded).  Otherwise,
542     a texture value is found according to the parameter values of the
543     currently bound texture image of the appropriate dimensionality.
544
545     However, when cube map texturing is enabled, the rules are
546     more complicated.  For cube map texturing, the (s,t,r) texture
547     coordinates are treated as a direction vector (rx,ry,rz) emanating
548     from the center of a cube.  (The q coordinate can be ignored since
549     it merely scales the vector without affecting the direction.) At
550     texture application time, the interpolated per-fragment (s,t,r)
551     selects one of the cube map face's 2D image based on the largest
552     magnitude coordinate direction (the major axis direction).
553     The target column in the table below explains how the major axis
554     direction maps to the 2D image of a particular cube map target.
555
556      major axis
557      direction     target                             sc     tc    ma
558      ----------    -------------------------------    ---    ---   ---
559       +rx          TEXTURE_CUBE_MAP_POSITIVE_X_EXT    -rz    -ry   rx
560       -rx          TEXTURE_CUBE_MAP_NEGATIVE_X_EXT    +rz    -ry   rx
561       +ry          TEXTURE_CUBE_MAP_POSITIVE_Y_EXT    +rx    +rz   ry
562       -ry          TEXTURE_CUBE_MAP_NEGATIVE_Y_EXT    +rx    -rz   ry
563       +rz          TEXTURE_CUBE_MAP_POSITIVE_Z_EXT    +rx    -ry   rz
564       -rz          TEXTURE_CUBE_MAP_NEGATIVE_Z_EXT    -rx    -ry   rz
565
566     Using the sc, tc, and ma determined by the major axis direction as
567     specified in the table above, an updated (s,t) is calculated as
568     follows
569
570        s   =   ( sc/|ma| + 1 ) / 2
571        t   =   ( tc/|ma| + 1 ) / 2
572
573     If |ma| is zero or very nearly zero, the results of the above two
574     equations need not be defined (though the result may not lead to
575     GL interruption or termination).
576
577     This new (s,t) is used to find a texture value in the determined
578     face's 2D texture image using the rules given in sections 3.8.5
579     and 3.8.6." ...
580
581Additions to Chapter 4 of the 1.2 Specification (Per-Fragment Operations
582and the Frame Buffer)
583
584     None
585
586Additions to Chapter 5 of the 1.2 Specification (Special Functions)
587
588 --  Section 5.4 "Display Lists"
589
590     In the second to the last paragraph (page 179), add
591     PROXY_TEXTURE_CUBE_MAP_EXT to the list of PROXY_* tokens.
592
593Additions to Chapter 6 of the 1.2 Specification (State and State Requests)
594
595 --  Section 6.1.3 "Enumerated Queries"
596
597     Change the fourth paragraph (page 183) to say:
598
599     "The GetTexParameter and GetTexLevelParameter parameter
600     <target> may be one of TEXTURE_1D, TEXTURE_2D, TEXTURE_3D,
601     or TEXTURE_CUBE_MAP_EXT, indicating the currently bound
602     one-dimensional, two-dimensional, three-dimensional, or cube map
603     texture object.  For GetTexLevelParameter, <target> may be one of
604     TEXTURE_1D, TEXTURE_2D, TEXTURE_3D, TEXTURE_CUBE_MAP_POSITIVE_X_EXT,
605     TEXTURE_CUBE_MAP_NEGATIVE_X_EXT, TEXTURE_CUBE_MAP_POSITIVE_Y_EXT,
606     TEXTURE_CUBE_MAP_NEGATIVE_Y_EXT, TEXTURE_CUBE_MAP_POSITIVE_Z_EXT,
607     TEXTURE_CUBE_MAP_NEGATIVE_Z_EXT, PROXY_TEXTURE_1D, PROXY_TEXTURE_2D,
608     PROXY_TEXTURE_3D, or PROXY_TEXTURE_CUBE_MAP, indicating the
609     one-dimensional, two-dimensional, three-dimensional texture
610     object, or distinct cube map texture 2D image, or one-dimensional,
611     two-dimensional, three-dimensional, or cube map proxy state vector.
612     Note that TEXTURE_CUBE_MAP_EXT is not a valid <target> parameter for
613     GetTexLevelParameter because it does not specify a particular cube
614     map face."
615
616 --  Section 6.1.4 "Texture Queries"
617
618     Change the first paragraph to read:
619
620     ... "It is somewhat different from the other get commands; <tex>
621     is a symbolic value indicating which texture (or texture face in the
622     case of a cube map texture target name) is to be obtained.
623     TEXTURE_1D indicates a one-dimensional texture, TEXTURE_2D
624     indicates a two-dimensional texture, TEXTURE_3D indicates a
625     three-dimensional texture, and TEXTURE_CUBE_MAP_POSITIVE_X_EXT,
626     TEXTURE_CUBE_MAP_NEGATIVE_X_EXT, TEXTURE_CUBE_MAP_POSITIVE_Y_EXT,
627     TEXTURE_CUBE_MAP_NEGATIVE_Y_EXT, TEXTURE_CUBE_MAP_POSITIVE_Z_EXT,
628     and TEXTURE_CUBE_MAP_NEGATIVE_Z_EXT indicate the respective face of
629     a cube map texture.
630
631Additions to the GLX Specification
632
633     None
634
635Errors
636
637     INVALID_ENUM is generated when TexGen is called with a <coord> of Q
638     when <pname> indicates REFLECTION_MAP_EXT or NORMAL_MAP_EXT.
639
640New State
641
642(table 6.12, p202) add the following entries:
643
644Get Value                        Type    Get Command   Initial Value   Description           Sec    Attribute
645---------                        ----    -----------   -------------   -----------           ------ --------------
646TEXTURE_CUBE_MAP_EXT             B       IsEnabled     False           True if cube map      3.8.10 texture/enable
647                                                                       texturing is enabled
648TEXTURE_BINDING_CUBE_MAP_EXT     Z+      GetIntegerv   0               Texture object        3.8.8  texture
649                                                                       for TEXTURE_CUBE_MAP
650TEXTURE_CUBE_MAP_POSITIVE_X_EXT  nxI     GetTexImage   see 3.8         positive x face       3.8    -
651                                                                       cube map texture
652                                                                       image at lod i
653TEXTURE_CUBE_MAP_NEGATIVE_X_EXT  nxI     GetTexImage   see 3.8         negative x face       3.8    -
654                                                                       cube map texture
655                                                                       image at lod i
656TEXTURE_CUBE_MAP_POSITIVE_Y_EXT  nxI     GetTexImage   see 3.8         positive y face       3.8    -
657                                                                       cube map texture
658                                                                       image at lod i
659TEXTURE_CUBE_MAP_NEGATIVE_Y_EXT  nxI     GetTexImage   see 3.8         negative y face       3.8    -
660                                                                       cube map texture
661                                                                       image at lod i
662TEXTURE_CUBE_MAP_POSITIVE_Z_EXT  nxI     GetTexImage   see 3.8         positive z face       3.8    -
663                                                                       cube map texture
664                                                                       image at lod i
665TEXTURE_CUBE_MAP_NEGATIVE_Z_EXT  nxI     GetTexImage   see 3.8         negative z face       3.8    -
666                                                                       cube map texture
667                                                                       image at lod i
668
669(table 6.14, p204) change the entry for TEXTURE_GEN_MODE to:
670
671Get Value            Type    Get Command     Initial Value   Description        Sec    Attribute
672---------            ----    -----------     -------------   -----------        ------ ---------
673TEXTURE_GEN_MODE     4xZ5    GetTexGeniv     EYE_LINEAR      Function used for  2.10.4 texture
674                                                             texgen (for s,t,r,
675                                                             and q)
676
677(the type changes from 4xZ3 to 4xZ5)
678
679New Implementation Dependent State
680
681(table 6.24, p214) add the following entry:
682
683Get Value                       Type    Get Command   Minimum Value   Description           Sec    Attribute
684---------                       ----    -----------   -------------   -----------           ------ --------------
685MAX_CUBE_MAP_TEXTURE_SIZE_EXT   Z+      GetIntegerv   16              Maximum cube map      3.8.1  -
686                                                                      texture image
687                                                                      dimension
688