• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1Name
2
3    ARB_texture_compression
4
5Name Strings
6
7    GL_ARB_texture_compression
8
9Contact
10
11    Pat Brown, Intel Corporation (patrick.r.brown 'at' intel.com)
12
13Notice
14
15    Copyright (c) 2000-2013 The Khronos Group Inc. Copyright terms at
16        http://www.khronos.org/registry/speccopyright.html
17
18Specification Update Policy
19
20    Khronos-approved extension specifications are updated in response to
21    issues and bugs prioritized by the Khronos OpenGL Working Group. For
22    extensions which have been promoted to a core Specification, fixes will
23    first appear in the latest version of that core Specification, and will
24    eventually be backported to the extension document. This policy is
25    described in more detail at
26        https://www.khronos.org/registry/OpenGL/docs/update_policy.php
27
28Status
29
30    Complete. Approved by ARB on March 16, 2000
31
32Version
33
34    Last Modified Date: May 23, 2000
35    Author Revision: 1.03
36
37Number
38
39    ARB Extension #12
40
41Dependencies
42
43    OpenGL 1.1 is required.
44
45    This extension is written against the OpenGL 1.2.1 Specification.
46
47    This extension is written against the GLX Extensions for OpenGL
48    Specification (Version 1.3).
49
50    Depends on GL_ARB_texture_cube_map, as cube maps may be stored in
51    compressed form.
52
53Overview
54
55    Compressing texture images can reduce texture memory utilization and
56    improve performance when rendering textured primitives.  This extension
57    allows OpenGL applications to use compressed texture images by providing:
58
59        (1) A framework upon which extensions providing specific compressed
60            image formats can be built.
61
62        (2) A set of generic compressed internal formats that allow
63            applications to specify that texture images should be stored in
64            compressed form without needing to code for specific compression
65            formats.
66
67    An application can define compressed texture images by providing a texture
68    image stored in a specific compressed image format.  This extension does
69    not define any specific compressed image formats, but it does provide the
70    mechanisms necessary to enable other extensions that do.
71
72    An application can also define compressed texture images by providing an
73    uncompressed texture image but specifying a compressed internal format.
74    In this case, the GL will automatically compress the texture image using
75    the appropriate image format.  Compressed internal formats can either be
76    specific (as above) or generic.  Generic compressed internal formats are
77    not actual image formats, but are instead mapped into one of the specific
78    compressed formats provided by the GL (or to an uncompressed base internal
79    format if no appropriate compressed format is available).  Generic
80    compressed internal formats allow applications to use texture compression
81    without needing to code to any particular compression algorithm.  Generic
82    compressed formats allow the use of texture compression across a wide
83    range of platforms with differing compression algorithms and also allow
84    future GL implementations to substitute improved compression methods
85    transparently.
86
87    Compressed texture images can be obtained from the GL in uncompressed form
88    by calling GetTexImage and in compressed form by calling
89    GetCompressedTexImageARB.  Queried compressed images can be saved and
90    later reused by calling CompressedTexImage[123]DARB.  Pre-compressed
91    texture images do not need to be processed by the GL and should
92    significantly improve texture loading performance relative to uncompressed
93    images.
94
95    This extension does not define specific compressed image formats (e.g.,
96    S3TC, FXT1), nor does it provide means to encode or decode such images.
97    To support images in a specific compressed format, a hardware vendor
98    would:
99
100      (1) Provide a new extension defininig specific compressed
101          <internalformat> and <format> tokens for TexImage[123]D,
102          TexSubImage[123]D, CopyTexImage[12]D, CompressedTexImage[123]DARB,
103          CompressedTexSubImage[123]DARB, and GetCompressedTexImageARB calls.
104
105      (2) Specify the encoding of compressed images of that specific format.
106
107      (3) Specify a method for deriving the size of compressed images of that
108          specific format, using the <internalformat>, <width>, <height>,
109          <depth> parameters, and (if necessary) the compressed image itself.
110
111IP Status
112
113    No known intellectual property issues on this general extension.
114
115    Specific compression algorithms used to implement this extension (and any
116    other specific texture compression extensions) may be protected and
117    require licensing agreements.
118
119Issues
120
121    (1) Should we define additional internal formats that strongly tie an
122    underlying compression algorithm to the format?
123
124      RESOLVED:  Not here.  Explicit compressed formats will be provided by
125      other extensions built on top of this one.
126
127    (2) Should we provide additional compression state that gives more control
128    on the level/quality of compression?  If so, how?
129
130      RESOLVED:  Yes, as a hint.  Could have also been implemented as a [0.0,
131      1.0] floating-point TexParameter "quality" state variable (such as the
132      JPEG quality scale found in many apps).  This control will affect only
133      the speed (and quality) with which a driver compresses incoming images,
134      but will not affect the compressed image format selected by the driver.
135
136      As the spec is currently formulated, the requirement that quality
137      control not affect compression format selection could have been relaxed
138      by loosening the invariance requirements (so that the quality control
139      can affect the choice of internal format).  The risk was the potential
140      for subtle mipmap consistency issues if the hint changes.
141
142    (3) Most current compression algorithms handle primarily RGB and RGBA
143    images.  Does it make sense having generic compressed formats for alpha,
144    intensity, luminance, and luminance-alpha?
145
146      RESOLVED:  Yes.  It is conceivable that some or all of these formats may
147      be compressed.  Implementations not having compression algorithms for
148      these formats can simply choose not to compress and use the appropriate
149      base internal format instead.
150
151    (4) Full GetTexImage support requires that the renderer decompress the
152    whole image.  Should this extra implementation burden be imposed on the
153    renderer?
154
155      RESOLVED:  Yes, returning the uncompressed image is a useful feature for
156      evaluating the quality of the compressed image.  A decompression engine
157      may also be required for a number of other areas, including software
158      rasterization.
159
160    (5) Full TexSubImage support may require that the renderer decompress
161    portions of the image (or perhaps the whole image), do a merge, and then
162    recompress.  Even if this were done, portions of the image outside the
163    "modified" area may also be modified due to lossy compression. Should this
164    extra implementation burden be imposed on the renderer?
165
166      RESOLVED:  No.  To avoid the complications involved with modifying a
167      compressed texture image, only the lower-left corner may be modified by
168      TexSubImage.  In addition, after calling TexSubImage, the "unmodified"
169      portion of the image is left undefined. An INVALID_OPERATION error
170      results from any other TexSubImage calls.
171
172      This behavior allows for the use of compressed images whose dimensions
173      are not powers of two, which TexImage will not accept.  The recommended
174      sequence of calls for defining such images is to first call TexImage
175      with a NULL <data> pointer and the image size parameters padded out to
176      the next power of two, and then call CompressedTexSubImageARB or
177      TexSubImage with <xoffset>, <yoffset>, and <zoffset> parameters of zero
178      and the compressed data pointed to by <data>.  This behavior also allows
179      TexSubImage to be used as a light-weight replacement of TexImage, where
180      only the image contents are modified.
181
182      Certain compressed formats may allow a wider variety of edits -- their
183      specifications will document the restrictions under which these edits
184      are permitted.  it is impossible to document such restrictions for
185      unknown generic formats.  It is desirable to keep the behavior of
186      generic formats and the specific formats they map to as consistent as
187      possible.
188
189    (6) What do the return values of the component sizes (RED_BITS,
190    GREEN_BITS, ...) give for compressed textures?  Compressed proxy textures?
191
192      RESOLVED:  Some behavior has to be defined. For both normal and proxy
193      textures, we return the bit depths of an uncompressed sized image that
194      would most closely match the quality of the compression algorithm for an
195      "average" texture image.  Since compressed image quality is highly data
196      dependent, the actual compressed image quality may be better or worse
197      than the renderer's best guess at the best matching sized internal
198      format.  To implement this feature in a driver, it is expected that an
199      error analysis would be done on a set of representative images, and the
200      resultant "equivalent bit depths" would be hardwired constants.
201
202    (7) What should GetTexLevelParameter with TEXTURE_COMPRESSED_
203    IMAGE_SIZE_ARB return for existing uncompressed formats?  For proxy
204    textures?
205
206      RESOLVED: For both, an INVALID_OPERATION error results.  The actual
207      image to be compressed is not available for proxies, so actually
208      compressing the specified image is not an option.
209
210      For uncompressed internal formats, we could return the actual amount of
211      memory taken by the texture image.  Such a mechanism might be useful as
212      a metric of "how much space does this texture image take".  It's not
213      particularly useful for an application based texture management scheme,
214      since there is no information available indicating the amount of
215      available memory.  In addition, because of implementation-dependent
216      hardware constraints, the amount of texture memory consumed by a texture
217      object is not necessarily equal to the sum of the memory consumed by
218      each of its mipmaps.  The OpenGL ARB decided against adopting this
219      behavior when this specification was approved.
220
221    (8) What about texture borders?
222
223      RESOLVED:  Not a problem for generic compressed formats since a base
224      internal format can be used if borders are not supported in the
225      compressed image format.  Borders may pose problems for specific
226      compression extensions, and compressed textures with borders might well
227      be disallowed by those extensions.
228
229    (9) Should certain pixel operations be disallowed for compressed texture
230    internal formats (e.g., PixelStorage, PixelTransfer)?  What about byte
231    swapping?
232
233      RESOLVED:  For uncompressed source images, all pixel storage and pixel
234      transfer modes will be applied prior to compression.  For compressed
235      source images, all pixel storage and transfer modes will be ignored.
236      The encoding of compressed images should be specified as a byte stream
237      that matches the disk file format defined for the corresponding image
238      type.
239
240    (10) Should functionality be provided to allow applications to save
241    compressed images to disk and reuse them in subsequent runs without
242    programming to specific formats?  If so, how?
243
244      RESOLVED:  Yes.  This can be done without knowledge of specific
245      compression formats in the following manner:
246
247        * Call TexImage with an uncompressed image and a generic compressed
248          internal format.  The texture image will be compressed by the GL, if
249          possible.
250
251        * Call GetTexLevelParameteriv with a <value> of TEXTURE_COMPRESSED_ARB
252          to determine if the GL was able to store the image in compressed
253          form.
254
255        * Call GetTexLevelParameteriv with a <value> of
256          TEXTURE_INTERNAL_FORMAT to determine the specific compressed image
257          format in which the image is stored.
258
259        * Call GetTexLevelParameteriv with a <value> of
260          TEXTURE_COMPRESSED_IMAGE_SIZE_ARB to determine the size (in ubytes)
261          of the compressed image that will be returned by the GL.  Allocate a
262          buffer of at least this size.
263
264        * Call GetCompressedTexImageARB.  The GL will write the compressed
265          texture image into the allocated buffer.
266
267        * Save the returned compressed image to disk, along with the
268          associated width, height, depth, border parameters and the returned
269          values of TEXTURE_COMPRESSED_IMAGE_SIZE_ARB and
270          TEXTURE_INTERNAL_FORMAT.
271
272        * Load the compressed image and its parameters, and call
273          CompressedTexImage_[123]DARB to use the compressed image.  The value
274          of TEXTURE_INTERNAL_FORMAT should be used as <internalFormat> and
275          the value of TEXTURE_COMPRESSED_IMAGE_SIZE_ARB should be used as
276          <imageSize>.
277
278      The saved images will be valid as long as they are used on a device
279      supporting the returned <internalFormat> parameter.  If the saved images
280      are used on a device that does not support the compressed internal
281      format, an INVALID_ENUM error would be generated by the call to
282      CompressedTexImage_[123]D because of the unknown format.
283
284      Note also that to reliably determine if the GL will compress an image
285      without actually compressing it, an application need only define a proxy
286      texture image and query TEXTURE_COMPRESSED_ARB as above.
287
288    (11) Without knowing of the compressed image format, there is no
289    convenient way for the client-side GLX library or tracing tools to
290    ascertain the size of a compressed texture image when sending a
291    TexImage1D, TexImage2D, or TexImage3D packet or interpret pixel storage
292    modes.  To complicate matters further, it is possible to create both
293    indirect (that might not understand an image format) and direct rendering
294    contexts (that might understand an image format) on the same renderer.
295    How should this be solved?
296
297      RESOLVED:  A separate set of CompressedTexImage and
298      CompressedTexSubImage calls has been created that allows libraries to
299      pass compressed images along to the renderer without needing to
300      understand their specific image formats or how to interpret pixel
301      storage modes.
302
303    (12) Are the CompressedTexImage[123]DARB entry points really needed?
304
305      RESOLVED:  Yes.  To robustly support images of unknown format, specific
306      compressed entry points are required.  While the extension does not
307      support images in a completely unspecified format (early drafts did),
308      having a separate call means that GLX and tools such as GLS (stream
309      encoder) do not need intimate knowledge of every compressed image
310      format.  Having separate calls also cleanly solves the problem where
311      pixel storage and pixel transfer operations apply if and only if the
312      source image is uncompressed.
313
314    (13) Is variable-ratio compression supported?
315
316      RESOLVED:  Yes.  Fixed-ratio compression is currently the predominant
317      texture compression format, but this spec should not preclude the use of
318      other compression schemes.
319
320    (14) Should the <imageSize> parameter be validated on CompressedTexImage
321    calls?
322
323      RESOLVED: Yes.  Enforcement overhead is generally trivial.  Without
324      enforcement, an application could specify incorrect image sizes but
325      notice them only when run on an indirect renderer, causing portability
326      problems.  There is also a reliability issue with respect to the GLX
327      environment -- if the compressed image size provided by the user is less
328      than the required image size, the GLX server may run off the end of the
329      image and access invalid memory.  A size check may thus be desirable to
330      prevent server crashes (even though that could be considered an
331      "undefined" result).
332
333      While enforcing correct <imageSize> parameters is trivial for current
334      compressed internal formats, it might not be reasonable on others
335      (particular variable-ratio compression formats).  For such formats, this
336      restriction should be overridden in the spec defining the formats.  The
337      <imageSize> check was made mandatory only in the final draft approved at
338      the March 2000 OpenGL ARB meeting.
339
340    (15) Should TexImage calls fall back to uncompressed image formats when
341    <internalformat> is a specific compressed format but its use in
342    combination with other parameter values passed is not supported by the
343    renderer?
344
345      RESOLVED:  Yes.  Advantages:  Works in exactly the same way as generic
346      formats, meaning no extra code/error checking.  Inherent limitations of
347      TexImage on specific formats should be documented in their specs and
348      observed by their users.  One simple query can detect fallback cases.
349      Disadvantages: Silent fallback to a format not requested by the user.
350
351    (16) Should the texture format invariance requirements disallow scanning
352    of the image data to select a compression method?  What about for a base
353    (uncompressed) internal format?
354
355      RESOLVED:  The primary issue is mipmap consistency.  The 1.2.1 spec
356      defines a set of mipmaps as consistent if all are specified using the
357      same internal format.  However, it doesn't require that all mipmaps are
358      allocated using the same format -- the renderer is responsible for
359      ensuring mipmap consistency if it selects different formats for
360      different images.  There is no reason to disallow scanning for base
361      internal formats; the renderer is responsible for doing the right thing.
362
363      The selection of a specific compressed internal format is different.  It
364      must be independent of the the image data because the GL treats the
365      texture image as though it were specified using the specific compressed
366      internal format chosen by the renderer.
367
368    (17) Should functionality be provided to enumerate the specific compressed
369    formats supported by the renderer?  If so, how and what will it accomplish?
370
371      RESOLVED:  Yes.  A glGet* query is added to return the number of
372      compressed internal formats supported by the renderer and the
373      <internalformat> tokens for each.  These tokens can subsequently be used
374      as <internalformat> parameters for normal TexImage calls and the new
375      CompressedTexImage calls.
376
377      Providing an internal format enumeration allows applications to weigh
378      the suitability of the various compression methods provided to it by the
379      renderer without needing specific knowledge of the formats.
380      Applications can query the component sizes (see issue 6) to determine
381      the base format and approximate precision.  Applications can directly
382      evaluate image compression quality by having the renderer generate
383      compressed texture images (using the returned <internalformat> values)
384      and return them in uncompressed form using GetTexImage.  Applications
385      should also be aware that the use of the internal formats returned by
386      this query is subject to the restrictions imposed by the specification
387      defining them.  The use of proxy textures allows the application to
388      determine if a specific set of TexImage parameters is supported for a
389      given internal format.
390
391      The renderer should enumerate all supported compression formats EXCEPT
392      those that operate fundamentally differently from a normal uncompressed
393      format.  For example, the DirectX DXT1 compression format is
394      fundamentally an RGB format, but it has a "transparent" encoding where
395      the red, green, and blue component values are forced to zero, regardless
396      of their original (uncompressed) values.  Since such formats may have
397      caveats that must be understood before being used, they should not be
398      enumerated by this query.
399
400      This allows for forward compatibility -- an application can exploit
401      compression techniques provided by future renderers.
402
403    (18) Should the separate GetCompressedTexImageARB function exist, or is
404         GetTexImage with special <format> and/or <type> parameters
405         sufficient?
406
407      RESOLVED:  Provide a separate GetCompressedTexImageARB function.  The
408      primary rationale is for GLX indirect rendering.  The client GetTexImage
409      would require information to determine if an image is uncompressed (and
410      should be decoded using pixel storage state) or compressed (pixel
411      storage ignored).  In addition, if the image is compressed, the actual
412      image size would be required, but the only image size that could be
413      inferred from the GLX protocol is padded out to a multiple of four
414      bytes.  A separate call is the cleanest solution to both issues.
415
416New Procedures and Functions
417
418    void CompressedTexImage3DARB(enum target, int level,
419                                 enum internalformat, sizei width,
420                                 sizei height, sizei depth,
421                                 int border, sizei imageSize,
422                                 const void *data);
423    void CompressedTexImage2DARB(enum target, int level,
424                                 enum internalformat, sizei width,
425                                 sizei height, int border,
426                                 sizei imageSize, const void *data);
427    void CompressedTexImage1DARB(enum target, int level,
428                                 enum internalformat, sizei width,
429                                 int border, sizei imageSize,
430                                 const void *data);
431    void CompressedTexSubImage3DARB(enum target, int level,
432                                    int xoffset, int yoffset,
433                                    int zoffset, sizei width,
434                                    sizei height, sizei depth,
435                                    enum format, sizei imageSize,
436                                    const void *data);
437    void CompressedTexSubImage2DARB(enum target, int level,
438                                    int xoffset, int yoffset,
439                                    sizei width, sizei height,
440                                    enum format, sizei imageSize,
441                                    const void *data);
442    void CompressedTexSubImage1DARB(enum target, int level,
443                                    int xoffset, sizei width,
444                                    enum format, sizei imageSize,
445                                    const void *data);
446    void GetCompressedTexImageARB(enum target, int lod,
447                                  void *img);
448
449New Tokens
450
451    Accepted by the <internalformat> parameter of TexImage1D, TexImage2D,
452    TexImage3D, CopyTexImage1D, and CopyTexImage2D:
453
454        COMPRESSED_ALPHA_ARB                            0x84E9
455        COMPRESSED_LUMINANCE_ARB                        0x84EA
456        COMPRESSED_LUMINANCE_ALPHA_ARB                  0x84EB
457        COMPRESSED_INTENSITY_ARB                        0x84EC
458        COMPRESSED_RGB_ARB                              0x84ED
459        COMPRESSED_RGBA_ARB                             0x84EE
460
461    Accepted by the <target> parameter of Hint and the <value> parameter of
462    GetIntegerv, GetBooleanv, GetFloatv, and GetDoublev:
463
464        TEXTURE_COMPRESSION_HINT_ARB                    0x84EF
465
466    Accepted by the <value> parameter of GetTexLevelParameter:
467
468        TEXTURE_COMPRESSED_IMAGE_SIZE_ARB               0x86A0
469        TEXTURE_COMPRESSED_ARB                          0x86A1
470
471    Accepted by the <value> parameter of GetIntegerv, GetBooleanv, GetFloatv,
472    and GetDoublev:
473
474        NUM_COMPRESSED_TEXTURE_FORMATS_ARB              0x86A2
475        COMPRESSED_TEXTURE_FORMATS_ARB                  0x86A3
476
477Additions to Chapter 2 of the OpenGL 1.2.1 Specification (OpenGL Operation)
478
479    None.
480
481Additions to Chapter 3 of the OpenGL 1.2.1 Specification (Rasterization)
482
483    Modify Section 3.8.1, Texture Image Specification (p.113)
484
485    (p.113, modify 3rd paragraph) <internalformat> may be specified as one of
486    the six base internal format symbolic constants listed in table 3.15, as
487    one of the sized internal format symbolic constants listed in table 3.16,
488    as one of the specific compressed internal format symbolic constants
489    listed in table 3.16.1, or as one of the six generic compressed internal
490    format symbolic constants listed in table 3.16.2.
491
492    (p.113, add after 3rd paragraph)
493
494    The ARB_texture_compression specification provides no specific compressed
495    internal formats but does provide a mechanism to obtain the enums for such
496    formats provided by other specifications.  If the ARB_texture_compression
497    extension is supported, the number of specific compressed internal format
498    symbolic constants supported by the renderer can be obtained by querying
499    the value of NUM_COMPRESSED_TEXTURE_FORMATS_ARB.  The set of specific
500    compressed internal format symbolic constants supported by the renderer
501    can be obtained by querying the value of COMPRESSED_TEXTURE_FORMATS_ARB.
502    The only symbolic constants returned by this query are those suitable for
503    general-purpose usage.  The renderer will not enumerate formats with
504    restrictions that need to be specifically understood prior to use.
505
506    Generic compressed internal formats are never used directly as the
507    internal formats of texture images.  If <internalformat> is one of the six
508    generic compressed internal formats, its value is replaced by the symbolic
509    constant for a specific compressed internal format of the GL's choosing
510    with the same base internal format.  If no specific compressed format is
511    available, <internalformat> is instead replaced by the corresponding base
512    internal format.  If <internalformat> is given as or mapped to a specific
513    compressed internal format, but the GL can not support images compressed
514    in the chosen internal format for any reason (e.g., the compression format
515    might not support 3D textures or borders), <internalformat> is replaced by
516    the corresponding base internal format and the texture image will not be
517    compressed by the GL.
518
519    (p.113, modify 4th paragraph) ... If a compressed internal format is
520    specified, the mapping of the R, G, B, and A values to texture components
521    is equivalent to the mapping of the corresponding base internal format's
522    components, as specified in table 3.15.  The specified image is compressed
523    using a (possibly lossy) compression algorithm chosen by the GL.
524
525    (p.113, 5th paragraph) A GL implementation may vary its allocation of
526    internal component resolution or compressed internal format based on any
527    TexImage3D, TexImage2D, or TexImage1D (see below) parameter (except
528    <target>, but the allocation and chosen compressed image format must not
529    be a function of any other state and cannot be changed once they are
530    established.  In addition, the choice of a compressed image format may not
531    be affected by the <data> parameter.  Allocations must be invariant; the
532    same allocation and compressed image format must be chosen each time a
533    texture image is specified with the same parameter values.  These
534    allocation rules also apply to proxy textures, which are described in
535    section 3.8.7.
536
537    Add Table 3.16.1:  Specific Compressed Internal Formats
538
539        Compressed Internal Format         Base Internal Format
540        ==========================         ====================
541        none provided here -- defined by dependent extensions
542
543
544    Add Table 3.16.2:  Generic Compressed Internal Formats
545
546        Generic Compressed Internal
547        Format                             Base Internal Format
548        ==========================         ====================
549        COMPRESSED_ALPHA_ARB               ALPHA
550        COMPRESSED_LUMINANCE_ARB           LUMINANCE
551        COMPRESSED_LUMINANCE_ALPHA_ARB     LUMINANCE_ALPHA
552        COMPRESSED_INTENSITY_ARB           INTENSITY
553        COMPRESSED_RGB_ARB                 RGB
554        COMPRESSED_RGBA_ARB                RGBA
555
556
557    Modify Section 3.8.2, Alternate Image Specification
558
559    (add to end of TexSubImage discussion, p.123)
560
561    Texture images with compressed internal formats may be stored in such a
562    way that it is not possible to edit an image with subimage commands
563    without having to decompress and recompress the texture image being
564    edited.  Even if the image were edited in this manner, it may not be
565    possible to preserve the contents of some of the texels outside the region
566    being modified.  To avoid these complications, the GL does not support
567    arbitrary edits to texture images with compressed internal formats.
568    Calling TexSubImage3D, CopyTexSubImage3D, TexSubImage2D,
569    CopyTexSubImage2D, TexSubImage1D, or CopyTexSubImage1D will result in an
570    INVALID_OPERATION error if <xoffset>, <yoffset>, or <zoffset> is not equal
571    to -b_s (border).  In addition, the contents of any texel outside the
572    region modified by such a call are undefined.  These restrictions may be
573    relaxed for specific compressed internal formats whose images are easily
574    edited.
575
576    (add new subsection at end of section, p.123)
577
578    Compressed Texture Images
579
580    Texture images may also be specified or modified using image data already
581    stored in a known compressed image format.  The ARB_texture_compression
582    extension defines no such formats, but provides the mechanisms for other
583    extensions that do.
584
585    The commands
586
587      void CompressedTexImage1DARB(enum target, int level,
588                                   enum internalformat, sizei width,
589                                   int border, sizei imageSize,
590                                   const void *data);
591      void CompressedTexImage2DARB(enum target, int level,
592                                   enum internalformat, sizei width,
593                                   sizei height, int border,
594                                   sizei imageSize, const void *data);
595      void CompressedTexImage3DARB(enum target, int level,
596                                   enum internalformat, sizei width,
597                                   sizei height, sizei depth,
598                                   int border, sizei imageSize,
599                                   const void *data);
600
601    define one-, two-, and three-dimensional texture images, respectively,
602    with incoming data stored in a specific compressed image format.  The
603    <target>, <level>, <internalformat>, <width>, <height>, <depth>, and
604    <border> parameters have the same meaning as in TexImage1D, TexImage2D,
605    and TexImage3D.  <data> points to compressed image data stored in the
606    compressed image format corresponding to <internalformat>.  Since this
607    extension provides no specific image formats, using any of the six generic
608    compressed internal formats as <internalformat> will result in an
609    INVALID_ENUM error.
610
611    For all other compressed internal formats, the compressed image will be
612    decoded according to the specification defining the <internalformat>
613    token.  Compressed texture images are treated as an array of <imageSize>
614    ubytes beginning at address <data>.  All pixel storage and pixel transfer
615    modes are ignored when decoding a compressed texture image.  If the
616    <imageSize> parameter is not consistent with the format, dimensions, and
617    contents of the compressed image, an INVALID_VALUE error results.  If the
618    compressed image is not encoded according to the defined image format, the
619    results of the call are undefined.
620
621    Specific compressed internal formats may impose format-specific
622    restrictions on the use of the compressed image specification calls or
623    parameters.  For example, the compressed image format might be supported
624    only for 2D textures or may not allow non-zero <border> values.  Any such
625    restrictions will be documented in the specification defining the
626    compressed internal format; violating these restrictions will result in an
627    INVALID_OPERATION error.
628
629    Any restrictions imposed by specific compressed internal formats will be
630    invariant, meaning that if the GL accepts and stores a texture image in
631    compressed form, providing the same image to CompressedTexImage1DARB,
632    CompressedTexImage2DARB, CompressedTexImage3DARB will not result in an
633    INVALID_OPERATION error if the following restrictions are satisfied:
634
635      * <data> points to a compressed texture image returned by
636        GetCompressedTexImageARB (Section 6.1.4).
637
638      * <target>, <level>, and <internalformat> match the <target>, <level>
639        and <format> parameters provided to the GetCompressedTexImageARB call
640        returning <data>.
641
642      * <width>, <height>, <depth>, <border>, <internalformat>, and
643        <imageSize> match the values of TEXTURE_WIDTH, TEXTURE_HEIGHT,
644        TEXTURE_DEPTH, TEXTURE_BORDER, TEXTURE_INTERNAL_FORMAT, and
645        TEXTURE_COMPRESSED_IMAGE_SIZE_ARB for image level <level> in effect at
646        the time of the GetCompressedTexImageARB call returning <data>.
647
648    This guarantee applies not just to images returned by
649    GetCompressedTexImageARB, but also to any other properly encoded
650    compressed texture image of the same size and format.
651
652
653    The commands
654
655      void CompressedTexSubImage1DARB(enum target, int level,
656                                      int xoffset, sizei width,
657                                      enum format, sizei imageSize,
658                                      const void *data);
659      void CompressedTexSubImage2DARB(enum target, int level,
660                                      int xoffset, int yoffset,
661                                      sizei width, sizei height,
662                                      enum format, sizei imageSize,
663                                      const void *data);
664      void CompressedTexSubImage3DARB(enum target, int level,
665                                      int xoffset, int yoffset,
666                                      int zoffset, sizei width,
667                                      sizei height, sizei depth,
668                                      enum format, sizei imageSize,
669                                      const void *data);
670
671
672    respecify only a rectangular region of an existing texture array, with
673    incoming data stored in a known compressed image format.  The <target>,
674    <level>, <xoffset>, <yoffset>, <zoffset>, <width>, <height>, and <depth>
675    parameters have the same meaning as in TexSubImage1D, TexSubImage2D, and
676    TexSubImage3D.  <data> points to compressed image data stored in the
677    compressed image format corresponding to <format>.  Since this extension
678    provides no specific image formats, using any of these six generic
679    compressed internal formats as <format> will result in an INVALID_ENUM
680    error.
681
682    The image pointed to by <data> and the <imageSize> parameter are
683    interpreted as though they were provided to CompressedTexImage1DARB,
684    CompressedTexImage2DARB, and CompressedTexImage3DARB.  These commands do
685    not provide for image format conversion, so an INVALID_OPERATION error
686    results if <format> does not match the internal format of the texture
687    image being modified.  If the <imageSize> parameter is not consistent with
688    the format, dimensions, and contents of the compressed image (too little
689    or too much data), an INVALID_VALUE error results.
690
691    As with CompressedTexImage calls, compressed internal formats may have
692    additional restrictions on the use of the compressed image specification
693    calls or parameters.  Any such restrictions will be documented in the
694    specification defining the compressed internal format; violating these
695    restrictions will result in an INVALID_OPERATION error.
696
697    Any restrictions imposed by specific compressed internal formats will be
698    invariant, meaning that if the GL accepts and stores a texture image in
699    compressed form, providing the same image to CompressedTexSubImage1DARB,
700    CompressedTexSubImage2DARB, CompressedTexSubImage3DARB will not result in
701    an INVALID_OPERATION error if the following restrictions are satisfied:
702
703      * <data> points to a compressed texture image returned by
704        GetCompressedTexImageARB (Section 6.1.4).
705
706      * <target>, <level>, and <format> match the <target>, <level> and
707        <format> parameters provided to the GetCompressedTexImageARB call
708        returning <data>.
709
710      * <width>, <height>, <depth>, <format>, and <imageSize> match the values
711        of TEXTURE_WIDTH, TEXTURE_HEIGHT, TEXTURE_DEPTH,
712        TEXTURE_INTERNAL_FORMAT, and TEXTURE_COMPRESSED_IMAGE_SIZE_ARB for
713        image level <level> in effect at the time of the
714        GetCompressedTexImageARB call returning <data>.
715
716      * <width>, <height>, <depth>, <format> match the values of
717        TEXTURE_WIDTH, TEXTURE_HEIGHT, TEXTURE_DEPTH, and
718        TEXTURE_INTERNAL_FORMAT currently in effect for image level <level>.
719
720      * <xoffset>, <yoffset>, and <zoffset> are all "-<b>", where <b> is the
721        value of TEXTURE_BORDER currently in effect for image level <level>.
722
723    This guarantee applies not just to images returned by
724    GetCompressedTexImageARB, but also to any other properly encoded
725    compressed texture image of the same size.
726
727    Calling CompressedTexSubImage3D, CompressedTexSubImage2D, or
728    CompressedTexSubImage1D will result in an INVALID_OPERATION error if
729    <xoffset>, <yoffset>, or <zoffset> is not equal to -b_s (border), or if
730    <width>, <height>, and <depth> do not match the values of TEXTURE_WIDTH,
731    TEXTURE_HEIGHT, or TEXTURE_DEPTH, respectively.  The contents of any texel
732    outside the region modified by the call are undefined.  These restrictions
733    may be relaxed for specific compressed internal formats whose images are
734    easily edited.
735
736Additions to Chapter 4 of the OpenGL 1.2.1 Specification (Per-Fragment
737Operations and the Frame Buffer)
738
739    None.
740
741Additions to Chapter 5 of the OpenGL 1.2.1 Specification (Special Functions)
742
743    Modify Section 5.6, Hints (p.180)
744
745    (p.180, modify first paragraph)
746
747    ...; FOG_HINT, indicating whether fog calculations are done per pixel or
748    per vertex; and TEXTURE_COMPRESSION_HINT_ARB, indicating the desired
749    quality and performance of compressing texture images.
750
751    For the texture compression hint, a <hint> of FASTEST indicates that
752    texture images should be compressed as quickly as possible, while NICEST
753    indicates that the texture images be compressed with as little image
754    degradation as possible.  FASTEST should be used for one-time texture
755    compression, and NICEST should be used if the compression results are to
756    be retrieved by GetCompressedTexImageARB (Section 6.1.4) for reuse.
757
758Additions to Chapter 6 of the OpenGL 1.2.1 Specification (State and
759State Requests)
760
761    Modify Section 6.1.3, Enumerated Queries (p.183)
762
763    (p.183, modify next-to-last paragraph)
764
765    For texture images with uncompressed internal formats, queries of
766    TEXTURE_RED_SIZE, TEXTURE_GREEN_SIZE, TEXTURE_BLUE_SIZE,
767    TEXTURE_ALPHA_SIZE, TEXTURE_LUMINANCE_SIZE, and TEXTURE_INTENSITY_SIZE
768    return the actual resolutions of the stored image array components, not
769    the resolutions specified when the image array was defined.  For texture
770    images with a compressed internal format, the resolutions returned specify
771    the component resolution of an uncompressed internal format that produces
772    an image of roughly the same quality as the compressed image in question.
773    Since the quality of the implementation's compression algorithm is likely
774    data-dependent, the returned component sizes should be treated only as
775    rough approximations.  ...
776
777    (p.183, add to end of next-to-last paragraph)
778
779    TEXTURE_COMPRESSED_IMAGE_SIZE_ARB returns the size (in ubytes) of the
780    compressed texture image that would be returned by
781    GetCompressedTexImageARB (Section 6.1.4).  Querying
782    TEXTURE_COMPRESSED_IMAGE_SIZE_ARB is not allowed on texture images with an
783    uncompressed internal format or on proxy targets and will result in an
784    INVALID_OPERATION error if attempted.
785
786    Modify Section 6.1.4, Texture Queries (p.184)
787
788    (add immediately after the GetTexImage section and before the IsTexture
789    section)
790
791    The command
792
793      void GetCompressedTexImageARB(enum target, int lod,
794                                    void *img);
795
796    is used to obtain texture images stored in compressed form.  The
797    parameters <target>, <lod>, and <img> are interpreted in the same manner
798    as in GetTexImage.  When called, GetCompressedTexImageARB writes
799    TEXTURE_COMPRESSED_IMAGE_SIZE_ARB ubytes of compressed image data to the
800    memory pointed to by <img>.  The compressed image data is formatted
801    according to the specification defining INTERNAL_FORMAT.  All pixel
802    storage and pixel transfer modes are ignored when returning a compressed
803    texture image.
804
805    Calling GetCompressedTexImageARB with an <lod> value less than zero or
806    greater than the maximum allowable causes an INVALID_VALUE error.  Calling
807    GetCompressedTexImageARB with a texture image stored with an uncompressed
808    internal format causes an INVALID_OPERATION error.
809
810Additions to Appendix A of the OpenGL 1.2.1 Specification (Invariance)
811
812    None.
813
814
815Additions to the AGL/GLX/WGL Specifications
816
817    None.
818
819GLX Protocol
820
821    (Add after GetTexImage to Section 2.2.2 of the GLX 1.3 encoding spec,
822     p.74)
823
824    GetCompressedTexImageARB
825
826        1       CARD8               opcode (X assigned)
827        1       160                 GLX opcode
828        2       4                   request length
829        4       GLX_CONTEXT_TAG     context tag
830        4       ENUM                target
831        4       INT32               level
832
833     -->
834
835        1       1                   Reply
836        1       1                   unused
837        2       CARD16              sequence number
838        4       n                   reply length
839        8                           unused
840        4       INT32               compressed image size (in bytes) --
841                                      should be between 4n-3 and 4n
842        12                          unused
843        4*n     LISTofBYTE          teximage
844
845    Note that n may be zero, indicating that a GL error occurred.
846
847    Since pixel storage modes do not apply to compressed texture images,
848    teximage is simply an array of bytes.  The client library will ignore
849    pixel storage modes and should copy only <compressed image size> bytes,
850    regardless of the value of <reply length>.
851
852    (Add to end of Section 2.3 of the GLX 1.3 encoding spec, p.147)
853
854    CompressedTexImage1DARB
855
856        2       32+n+p          rendering command length
857        2       214             rendering command opcode
858        4       ENUM            target
859        4       INT32           level
860        4       ENUM            internalformat
861        4       INT32           width
862        4                       unused
863        4       INT32           border
864        n       LISTofBYTE      image
865        4       INT32           imageSize
866        p                       unused, p=pad(n)
867
868    If the command is encoded in a glXRenderLarge request, the command
869    opcode and command length fields are expanded to 4 bytes each.
870
871        4       36+n+p          rendering command length
872        4       214             rendering command opcode
873
874    CompressedTexImage2DARB
875
876        2       32+n+p          rendering command length
877        2       215             rendering command opcode
878        4       ENUM            target
879        4       INT32           level
880        4       ENUM            internalformat
881        4       INT32           width
882        4       INT32           height
883        4       INT32           border
884        4       INT32           imageSize
885        n       LISTofBYTE      image
886        p                       unused, p=pad(n)
887
888    If the command is encoded in a glXRenderLarge request, the command
889    opcode and command length fields are expanded to 4 bytes each.
890
891        4       36+n+p          rendering command length
892        4       215             rendering command opcode
893
894    CompressedTexImage3DARB
895
896        2       36+n+p          rendering command length
897        2       216             rendering command opcode
898        4       ENUM            target
899        4       INT32           level
900        4       INT32           internalformat
901        4       INT32           width
902        4       INT32           height
903        4       INT32           depth
904        4       INT32           border
905        4       INT32           imageSize
906        n       LISTofBYTE      image
907        p                       unused, p=pad(n)
908
909    If the command is encoded in a glXRenderLarge request, the command
910    opcode and command length fields are expanded to 4 bytes each.
911
912        4       36+n+p          rendering command length
913        4       216             rendering command opcode
914
915    CompressedTexSubImage1DARB
916
917        2       36+n+p          rendering command length
918        2       217             rendering command opcode
919        4       ENUM            target
920        4       INT32           level
921        4       INT32           xoffset
922        4                       unused
923        4       INT32           width
924        4                       unused
925        4       ENUM            format
926        4       INT32           imageSize
927        n       LISTofBYTE      image
928        p                       unused, p=pad(n)
929
930    If the command is encoded in a glXRenderLarge request, the command
931    opcode and command length fields are expanded to 4 bytes each.
932
933        4       40+n+p          rendering command length
934        4       217             rendering command opcode
935
936    CompressedTexSubImage2DARB
937
938        2       36+n+p          rendering command length
939        2       218             rendering command opcode
940        4       ENUM            target
941        4       INT32           level
942        4       INT32           xoffset
943        4       INT32           yoffset
944        4       INT32           width
945        4       INT32           height
946        4       ENUM            format
947        4       INT32           imageSize
948        n       LISTofBYTE      image
949        p                       unused, p=pad(n)
950
951    If the command is encoded in a glXRenderLarge request, the command
952    opcode and command length fields are expanded to 4 bytes each.
953
954        4       40+n+p          rendering command length
955        4       218             rendering command opcode
956
957    CompressedTexSubImage3DARB
958
959        2       44+n+p          rendering command length
960        2       219             rendering command opcode
961        4       ENUM            target
962        4       INT32           level
963        4       INT32           xoffset
964        4       INT32           yoffset
965        4       INT32           zoffset
966        4       INT32           width
967        4       INT32           height
968        4       INT32           depth
969        4       ENUM            format
970        4       INT32           imageSize
971        n       LISTofBYTE      image
972        p                       unused, p=pad(n)
973
974    If the command is encoded in a glXRenderLarge request, the command
975    opcode and command length fields are expanded to 4 bytes each.
976
977        4       48+n+p          rendering command length
978        4       219             rendering command opcode
979
980
981Errors
982
983    Errors for compressed TexImage and TexSubImage calls specific to
984    compression:
985
986    INVALID_OPERATION is generated by TexSubImage1D, TexSubImage2D,
987    TexSubImage3D, CopyTexSubImage1D, CopyTexSubImage2D, or CopyTexSubImage3D
988    if the internal format of the texture image is compressed and <xoffset>,
989    <yoffset>, or <zoffset> does not equal -b, where b is value of
990    TEXTURE_BORDER.
991
992    INVALID_VALUE is generated by CompressedTexSubImage1DARB,
993    CompressedTexSubImage2DARB, or CompressedTexSubImage3DARB if the entire
994    texture image is not being edited:  if <xoffset>, <yoffset>, or <zoffset>
995    is greater than -b, <xoffset> + <width> is less than w+b, <yoffset> +
996    <height> is less than h+b, or <zoffset> + <depth> is less than d+b, where
997    b is the value of TEXTURE_BORDER, w is the value of TEXTURE_WIDTH, h is
998    the value of TEXTURE_HEIGHT, and d is the value of TEXTURE_DEPTH.
999
1000    INVALID_ENUM is generated by CompressedTexImage1DARB,
1001    CompressedTexImage2DARB, or CompressedTexImage3DARB,
1002    CompressedTexSubImage1DARB, CompressedTexSubImage2DARB, or
1003    CompressedTexSubImage3DARB, if <internalformat> is any of the six generic
1004    compressed internal formats (e.g., COMPRESSED_RGBA_ARB)
1005
1006    INVALID_OPERATION is generated by CompressedTexImage1DARB,
1007    CompressedTexImage2DARB, CompressedTexImage3DARB,
1008    CompressedTexSubImage1DARB, CompressedTexSubImage2DARB, or
1009    CompressedTexSubImage3DARB, if any parameter combinations are not
1010    supported by the specific compressed internal format.  Such invalid
1011    combinations are documented in the specification defining the internal
1012    format.
1013
1014    INVALID_VALUE is generated by CompressedTexImage1DARB,
1015    CompressedTexImage2DARB, or CompressedTexImage3DARB,
1016    CompressedTexSubImage1DARB, CompressedTexSubImage2DARB, or
1017    CompressedTexSubImage3DARB, if <imageSize> is not consistent with the
1018    format, dimensions, and contents of the specified image.  The appropriate
1019    value for the <imageSize> parameter is documented in the specification
1020    defining the compressed internal format.
1021
1022    Undefined results (including abnormal program termination) are generated
1023    by CompressedTexImage1DARB, CompressedTexImage2DARB, or
1024    CompressedTexImage3DARB, CompressedTexSubImage1DARB,
1025    CompressedTexSubImage2DARB, or CompressedTexSubImage3DARB, is not encoded
1026    in a manner consistent with the specification defining the internal
1027    format.
1028
1029    INVALID_OPERATION is generated by CompressedTexSubImage1DARB,
1030    CompressedTexSubImage2DARB, or CompressedTexSubImage3DARB if <format> does
1031    not match the internal format of the texture image being modified.
1032
1033    INVALID_OPERATION is generated by GetTexLevelParameter[if]v if <target> is
1034    PROXY_TEXTURE_1D, PROXY_TEXTURE_2D, or PROXY_TEXTURE_3D and <value> is
1035    TEXTURE_COMPRESSED_IMAGE_SIZE_ARB.
1036
1037    INVALID_OPERATION is generated by GetTexLevelParameter[if]v if the
1038    internal format of the queried texture image is not compressed and <value>
1039    is TEXTURE_COMPRESSED_IMAGE_SIZE_ARB.
1040
1041    INVALID_OPERATION is generated by GetCompressedTexImageARB if the internal
1042    format of the queried texture image is not compressed.
1043
1044
1045    Errors for compressed TexImage and TexSubImage calls not specific to
1046    compression:
1047
1048    INVALID_ENUM is generated by CompressedTexImage3DARB or
1049    CompressedTexSubImage3DARB if <target> is not TEXTURE_3D.
1050
1051    INVALID_ENUM is generated by CompressedTexImage2DARB or
1052    CompressedTexSubImage2DARB if <target> is not TEXTURE_2D,
1053    TEXTURE_CUBE_MAP_POSITIVE_X_ARB, TEXTURE_CUBE_MAP_NEGATIVE_X_ARB,
1054    TEXTURE_CUBE_MAP_POSITIVE_Y_ARB, TEXTURE_CUBE_MAP_NEGATIVE_Y_ARB,
1055    TEXTURE_CUBE_MAP_POSITIVE_Z_ARB, or TEXTURE_CUBE_MAP_NEGATIVE_Z_ARB.
1056
1057    INVALID_ENUM is generated by CompressedTexImage1DARB or
1058    CompressedTexSubImage1DARB if <target> is not TEXTURE_1D.
1059
1060    INVALID_VALUE is generated by CompressedTexImage1DARB,
1061    CompressedTexImage2DARB, CompressedTexImage3DARB,
1062    CompressedTexSubImage1DARB, CompressedTexSubImage1DARB, or
1063    CompressedTexSubImage3DARB if <level> is negative.
1064
1065    INVALID_VALUE is generated by CompressedTexImage1DARB,
1066    CompressedTexImage2DARB, CompressedTexImage3DARB,
1067    CompressedTexSubImage1DARB, CompressedTexSubImage2DARB, or
1068    CompressedTexSubImage3DARB, if <width>, <height>, or <depth> is negative.
1069
1070    INVALID_VALUE is generated by CompressedTexImage1DARB,
1071    CompressedTexImage2DARB, or CompressedTexImage3DARB if <width>, <height>,
1072    or <depth> can not be represented as 2^k+2 for some integer value k.
1073
1074    INVALID_VALUE is generated by CompressedTexImage1DARB,
1075    CompressedTexImage2DARB, or CompressedTexImage3DARB if <border> is not
1076    zero or one.
1077
1078    INVALID_VALUE is generated by CompressedTexImage1DARB,
1079    CompressedTexImage2DARB, CompressedTexImage3DARB,
1080    CompressedTexSubImage1DARB, CompressedTexSubImage1DARB, or
1081    CompressedTexSubImage3DARB if the call is made between a call to Begin and
1082    the corresponding call to End.
1083
1084    INVALID_VALUE is generated by CompressedTexSubImage1DARB,
1085    CompressedTexSubImage2DARB, or CompressedTexSubImage3DARB if <xoffset>,
1086    <yoffset>, or <zoffset> is less than -b, <xoffset> + <width> is greater
1087    than w+b, <yoffset> + <height> is greater than h+b, or <zoffset> + <depth>
1088    is greater than d+b, where b is the value of TEXTURE_BORDER, w is the
1089    value of TEXTURE_WIDTH, h is the value of TEXTURE_HEIGHT, and d is the
1090    value of TEXTURE_DEPTH.
1091
1092    INVALID_VALUE is generated by GetCompressedTexImageARB if <lod> is
1093    negative or greater than the maximum allowable level.
1094
1095New State
1096
1097    (table 6.12, p.202)
1098                                                                Initial
1099    Get Value                           Type    Get Command     Value   Description Sec.    Attribute
1100    ---------                           ----    -----------     ------- ----------- ----    ---------
1101    TEXTURE_COMPRESSED_IMAGE_SIZE_ARB   n x Z+  GetTexLevel-    0       size (in    3.8     -
1102                                                Parameter               ubytes)
1103                                                                        of xD compressed
1104                                                                        texture image i.
1105    TEXTURE_COMPRESSED_ARB              n x B   GetTexLevel-    FALSE   True if xD  3.8     -
1106                                                Parameter               image i has
1107                                                                        a compressed
1108                                                                        internal format
1109
1110    (table 6.23, p.213)
1111                                                                Initial
1112    Get Value                           Type    Get Command     Value   Description Sec.    Attribute
1113    ---------                           ----    -----------     ------- ----------- ----    ---------
1114    TEXTURE_COMPRESSION_HINT_ARB        Z_3     GetIntegerv     DONT_   Texture     5.6     hint
1115                                                                CARE    compression
1116                                                                        quality hint
1117
1118    (table 6.25, p. 215)
1119                                                                Minimum
1120    Get Value                           Type    Get Command     Value   Description Sec.    Attribute
1121    ---------                           ----    -----------     ------- ----------- ----    ---------
1122    NUM_COMPRESSED_TEXTURE_FORMATS_ARB  Z       GetIntegerv     0       Number of   3.8     -
1123                                                                        enumerated
1124                                                                        compressed
1125                                                                        texture
1126                                                                        formats
1127
1128    COMPRESSED_TEXTURE_FORMATS_ARB      0* x Z  GetIntegerv     -       Enumerated  3.8     -
1129                                                                        compressed
1130                                                                        texture
1131                                                                        formats
1132
1133Revision History
1134
1135    1.03, 05/23/00 prbrown1: Removed stray "None." paragraph in modifications
1136                             to Chapter 5.
1137
1138    1.02, 05/08/00 prbrown1: Fixed prototype of GetCompressedTexImageARB (no
1139                             "const" qualifiers) in "New Procedures and
1140                             Functions" section.  Changed <internalformat>
1141                             parameter of CompressedTexImage functions to be
1142                             an "enum" instead of an "int".  "int" was carried
1143                             over only on TexImage calls as a 1.0 legacy --
1144                             the newer CopyTexImage call takes an "enum".
1145
1146    1.01, 04/11/00 prbrown1: Minor bug fixes to the first published version.
1147                             Fixed prototypes to match extension spec
1148                             standards (no "GL" type prefixes).  Fixed a
1149                             couple erroneous function names.  Added "const"
1150                             qualifier to prototypes involving image data not
1151                             modified by the GL.  Added text to indicate that
1152                             compressed formats apply to texture maps
1153                             supported by GL_ARB_texture_cube_map.
1154
1155    1.0,  03/24/00 prbrown1: Applied changes approved as part of the extension
1156                             at the March 2000 ARB meeting, as follows:
1157
1158                             * CompressedTexSubImage:  Only allowed if the
1159                               entire image is replaced.  Document that this
1160                               restriction can be relaxed for specific
1161                               compression extensions.
1162                             * Renamed TEXTURE_IMAGE_SIZE_ARB to
1163                               TEXTURE_COMPRESSED_IMAGE_SIZE_ARB.
1164                             * Querying image size on uncompressed images is
1165                               now an INVALID_OPERATION error.
1166                             * INVALID_VALUE error is generated if <imageSize>
1167                               is inconsistent with the image data.  This
1168                               restriction may be overridden by specific
1169                               extensions only if requiring an image size
1170                               check is unreasonable.
1171                             * Added documentaion of undefined behavior for
1172                               CompressedTexImage/SubImage if the image data
1173                               is encoded in a manner inconsistent with the
1174                               spec defining the compressed image format.
1175                             * Fixed issue (16).  Text was truncated.
1176                             * Modified invariance section.  <data> can not
1177                               affect the choice of compressed internal
1178                               format, but can theoretically affect regular
1179                               component resolution.
1180                             * Add new function GetCompressedTexImage to deal
1181                               with subtle GLX issues.
1182                             * GLX protocol for CompressedTexImage/SubImage
1183                               and GetCompressedTexImage holds both a padded
1184                               image size (for GLX data transfer) and actual
1185                               image size (for packing in user buffers).
1186
1187                             Minor wording clean-ups.
1188
1189                             Added enum and GLX opcode values allocated from
1190                             OpenGL Extensions and GLX registries.
1191
1192    0.81, 03/07/00 prbrown1: Fixed error documentation for TexSubImage calls
1193                             of arbitrary alignment (did not document that the
1194                             internal format had to be compressed).  Removed
1195                             references to CopyTexImage3D, which doesn't
1196                             actually exist.
1197
1198                             Per Kurt Akeley suggestions: (1) Renamed
1199                             TexImageCompressed to CompressedTexImage to
1200                             conform with naming conventions, (2) clarified
1201                             that the main feature distinguishing
1202                             CompressedTex[Sub]Image calls from normal
1203                             Tex[Sub]Image calls is compressed input data, (3)
1204                             added query to explicitly determine whether the
1205                             internal format of a texture is compressed.
1206
1207    0.8,  02/23/00 prbrown1: Marked previously unresolved issues as resolved
1208                             per the ARB working group.  Added docs for errors
1209                             not specific to compression for the new
1210                             CompressedTexImage and CompressedTexSubImage
1211                             calls.  Added queries to enumerate specific
1212                             compressed texture formats.
1213    0.76, 02/16/00 prbrown1: Removed "gl" and "GL_" prefixes.
1214    0.75, 02/07/00 prbrown1: Incorporated feedback from 12/99 ARB meeting
1215                             and a number of other revisions.
1216    0.7,  12/03/99 prbrown1: Incorporated comments from public review of 0.2
1217                             document.
1218    0.2,  10/28/99 prbrown1: Renamed to ARB_texture_compression.  Significant
1219                             functional changes.
1220    0.11, 10/21/99 prbrown1: Edits suggested by 3dfx.
1221    0.1,  10/19/99 prbrown1: Initial revision.
1222
1223