2aa73c799ddae33d0c1573cdb317bb8e3c89451a
[platform/framework/web/crosswalk.git] / src / third_party / webgl / src / extensions / WEBGL_compressed_texture_atc / extension.xml
1 <?xml version="1.0"?>
2
3 <draft href="WEBGL_compressed_texture_atc/">
4   <name>WEBGL_compressed_texture_atc</name>
5   <contact>
6     <a href="https://www.khronos.org/webgl/public-mailing-list/">WebGL working group</a> (public_webgl 'at' khronos.org)
7   </contact>
8   <contributors>
9     <contributor>Members of the WebGL working group</contributor>
10   </contributors>
11   <number>12</number>
12   <depends>
13     <api version="1.0"/>
14   </depends>
15   <overview>
16     <p>
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.
20     </p>
21     <features>
22       <feature>
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.
27
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:
31         <table>
32           <tr>
33             <th>WebGL format enum</th>
34             <th>OpenGL format enum</th>
35             <th>Numeric value</th>
36           </tr>
37           <tr>
38             <td>COMPRESSED_RGB_ATC_WEBGL</td>
39             <td>ATC_RGB_AMD</td>
40             <td>0x8C92</td>
41           </tr>
42           <tr>
43             <td>COMPRESSED_RGBA_ATC_EXPLICIT_ALPHA_WEBGL</td>
44             <td>ATC_RGBA_EXPLICIT_ALPHA_AMD</td>
45             <td>0x8C93</td>
46           </tr>
47           <tr>
48             <td>COMPRESSED_RGBA_ATC_INTERPOLATED_ALPHA_WEBGL</td>
49             <td>ATC_RGBA_INTERPOLATED_ALPHA_AMD</td>
50             <td>0x87EE</td>
51           </tr>
52         </table>
53       </feature>
54       <feature>
55         Calling <code>getParameter</code> with the argument <code>COMPRESSED_TEXTURE_FORMATS</code>
56         will include the 3 formats from this specification.
57       </feature>
58       <feature>
59         <p>The following format-specific restrictions must be enforced:</p>
60         <dl>
61           <dt>COMPRESSED_RGB_ATC_WEBGL</dt>
62           <dd><p>The <code>byteLength</code> of the ArrayBufferView, <code>pixels</code>, passed to
63           either <code>compressedTexImage2D</code> or <code>compressedTexSubImage2D</code> must be
64           equal to the following number of bytes:</p>
65           <blockquote><code>
66             floor((width + 3) / 4) * floor((height + 3) / 4) * 8
67           </code></blockquote>
68           <p>If it is not, an <code>INVALID_VALUE</code> error is generated.</p>
69           </dd>
70
71           <dt>COMPRESSED_RGBA_ATC_EXPLICIT_ALPHA_WEBGL</dt>
72           <dt>COMPRESSED_RGBA_ATC_INTERPOLATED_ALPHA_WEBGL</dt>
73           <dd><p>The <code>byteLength</code> of the ArrayBufferView, <code>pixels</code>, passed to
74           either <code>compressedTexImage2D</code> or <code>compressedTexSubImage2D</code> must be
75           equal to the following number of bytes:</p>
76           <blockquote><code>
77             floor((width + 3) / 4) * floor((height + 3) / 4) * 16
78           </code></blockquote>
79           <p>If it is not, an <code>INVALID_VALUE</code> error is generated.</p>
80           </dd>
81         </dl>
82       </feature>
83     </features>
84   </overview>
85   <idl xml:space="preserve">
86 interface WEBGL_compressed_texture_atc {
87     /* Compressed Texture Formats */
88     const GLenum COMPRESSED_RGB_ATC_WEBGL                     = 0x8C92;
89     const GLenum COMPRESSED_RGBA_ATC_EXPLICIT_ALPHA_WEBGL     = 0x8C93;
90     const GLenum COMPRESSED_RGBA_ATC_INTERPOLATED_ALPHA_WEBGL = 0x87EE;
91 };
92   </idl>
93   <history>
94     <revision date="2012/09/11">
95       <change>Initial revision.</change>
96     </revision>
97     <revision date="2013/07/03">
98       <change>Clarified that length of ArrayBufferView is actually byteLength.</change>
99     </revision>
100   </history>
101 </draft>