3 <extension href="WEBGL_compressed_texture_atc/">
4 <name>WEBGL_compressed_texture_atc</name>
6 <a href="https://www.khronos.org/webgl/public-mailing-list/">WebGL working group</a> (public_webgl 'at' khronos.org)
9 <contributor>Members of the WebGL working group</contributor>
17 This extension exposes the compressed texture formats defined in the
18 <a href="http://www.khronos.org/registry/gles/extensions/AMD/AMD_compressed_ATC_texture.txt">
19 AMD_compressed_ATC_texture</a> OpenGL extension to WebGL.
23 Compression formats <code>COMPRESSED_RGB_ATC_WEBGL</code>,
24 <code>COMPRESSED_RGBA_ATC_EXPLICIT_ALPHA_WEBGL</code>, and
25 <code>COMPRESSED_RGBA_ATC_INTERPOLATED_ALPHA_WEBGL</code> may be passed to
26 the <code>compressedTexImage2D</code> and <code>compressedTexSubImage2D</code> entry points.
28 These formats correspond to the 3 formats defined in the AMD_compressed_ATC_texture OpenGL
29 extension. Although the enum names are changed, their numeric values are the same. The correspondence
30 is given by this table:
33 <th>WebGL format enum</th>
34 <th>OpenGL format enum</th>
35 <th>Numeric value</th>
38 <td>COMPRESSED_RGB_ATC_WEBGL</td>
43 <td>COMPRESSED_RGBA_ATC_EXPLICIT_ALPHA_WEBGL</td>
44 <td>ATC_RGBA_EXPLICIT_ALPHA_AMD</td>
48 <td>COMPRESSED_RGBA_ATC_INTERPOLATED_ALPHA_WEBGL</td>
49 <td>ATC_RGBA_INTERPOLATED_ALPHA_AMD</td>
55 Calling <code>getParameter</code> with the argument <code>COMPRESSED_TEXTURE_FORMATS</code>
56 will include the 3 formats from this specification.
59 <p>The following format-specific restrictions must be enforced:</p>
61 <dt>COMPRESSED_RGB_ATC_WEBGL</dt>
62 <dd><p>The <code>byteLength</code> of the ArrayBufferView, <code>pixels</code>, passed to
63 <code>compressedTexImage2D</code>, must be equal to the following number of bytes:</p>
65 floor((width + 3) / 4) * floor((height + 3) / 4) * 8
67 <p>If it is not, an <code>INVALID_VALUE</code> error is generated.</p>
70 <dt>COMPRESSED_RGBA_ATC_EXPLICIT_ALPHA_WEBGL</dt>
71 <dt>COMPRESSED_RGBA_ATC_INTERPOLATED_ALPHA_WEBGL</dt>
72 <dd><p>The <code>byteLength</code> of the ArrayBufferView, <code>pixels</code>, passed to
73 <code>compressedTexImage2D</code>, must be equal to the following number of bytes:</p>
75 floor((width + 3) / 4) * floor((height + 3) / 4) * 16
77 <p>If it is not, an <code>INVALID_VALUE</code> error is generated.</p>
83 <idl xml:space="preserve">
85 interface WEBGL_compressed_texture_atc {
86 /* Compressed Texture Formats */
87 const GLenum COMPRESSED_RGB_ATC_WEBGL = 0x8C92;
88 const GLenum COMPRESSED_RGBA_ATC_EXPLICIT_ALPHA_WEBGL = 0x8C93;
89 const GLenum COMPRESSED_RGBA_ATC_INTERPOLATED_ALPHA_WEBGL = 0x87EE;
93 <revision date="2012/09/11">
94 <change>Initial revision.</change>
96 <revision date="2013/07/03">
97 <change>Clarified that length of ArrayBufferView is actually byteLength.</change>
99 <revision date="2014/04/17">
100 <change>Removed reference to compressedTexSubImage2D. This format can only be used with compressedTexImage2D.</change>
102 <revision date="2014/06/27">
103 <change>Moved to community approved after discussion on public_webgl list.</change>
105 <revision date="2014/07/15">
106 <change>Added NoInterfaceObject extended attribute.</change>