| 1 | <?xml version="1.0"?> |
| 2 | |
| 3 | <extension href="WEBGL_compressed_texture_etc1/"> |
| 4 | <name>WEBGL_compressed_texture_etc1</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>24</number> |
| 12 | <depends> |
| 13 | <api version="1.0"/> |
| 14 | </depends> |
| 15 | <overview> |
| 16 | <p> |
| 17 | This extension exposes the compressed texture format defined in the |
| 18 | <a href="http://www.khronos.org/registry/gles/extensions/OES/OES_compressed_ETC1_RGB8_texture.txt"> |
| 19 | OES_compressed_ETC1_RGB8_texture</a> OpenGL ES extension to WebGL. |
| 20 | </p> |
| 21 | <features> |
| 22 | <feature> |
| 23 | Compression format <code>COMPRESSED_RGB_ETC1_WEBGL</code> may be passed to |
| 24 | the <code>compressedTexImage2D</code> entry point. |
| 25 | |
| 26 | This format correspond to the format defined in the OES_compressed_ETC1_RGB8_texture OpenGL ES |
| 27 | extension. Although the enum name is changed, the numeric value is the same. The correspondence |
| 28 | is given by this table: |
| 29 | <table> |
| 30 | <tr> |
| 31 | <th>WebGL format enum</th> |
| 32 | <th>OpenGL format enum</th> |
| 33 | <th>Numeric value</th> |
| 34 | </tr> |
| 35 | <tr> |
| 36 | <td>COMPRESSED_RGB_ETC1_WEBGL</td> |
| 37 | <td>ETC1_RGB8_OES</td> |
| 38 | <td>0x8D64</td> |
| 39 | </tr> |
| 40 | </table> |
| 41 | </feature> |
| 42 | <feature> |
| 43 | Calling <code>getParameter</code> with the argument <code>COMPRESSED_TEXTURE_FORMATS</code> |
| 44 | will include the format from this specification. |
| 45 | </feature> |
| 46 | <feature> |
| 47 | <p>The following format-specific restrictions must be enforced:</p> |
| 48 | <dl> |
| 49 | <dt>COMPRESSED_RGB_ETC1_WEBGL</dt> |
| 50 | <dd><p>The <code>byteLength</code> of the ArrayBufferView, <code>pixels</code>, passed to |
| 51 | <code>compressedTexImage2D</code> must be equal to the following number of bytes:</p> |
| 52 | <blockquote><code> |
| 53 | floor((width + 3) / 4) * floor((height + 3) / 4) * 8 |
| 54 | </code></blockquote> |
| 55 | <p>If it is not, an <code>INVALID_VALUE</code> error is generated.</p> |
| 56 | </dd> |
| 57 | </dl> |
| 58 | </feature> |
| 59 | </features> |
| 60 | </overview> |
| 61 | <idl xml:space="preserve"> |
| 62 | [NoInterfaceObject] |
| 63 | interface WEBGL_compressed_texture_etc1 { |
| 64 | /* Compressed Texture Format */ |
| 65 | const GLenum COMPRESSED_RGB_ETC1_WEBGL = 0x8D64; |
| 66 | }; |
| 67 | </idl> |
| 68 | <history> |
| 69 | <revision date="2012/02/23"> |
| 70 | <change>Initial revision.</change> |
| 71 | </revision> |
| 72 | <revision date="2013/07/03"> |
| 73 | <change>Clarified that length of ArrayBufferView is actually byteLength.</change> |
| 74 | </revision> |
| 75 | <revision date="2013/11/27"> |
| 76 | <change>Moved to draft status.</change> |
| 77 | </revision> |
| 78 | <revision date="2013/12/03"> |
| 79 | <change>Assigned extension number 24 to WEBGL_compressed_texture_etc1 extension.</change> |
| 80 | </revision> |
| 81 | <revision date="2014/03/07"> |
| 82 | <change>Remove ability to use the format with compressedTexSubImage2D, as per the GLES extension spec.</change> |
| 83 | </revision> |
| 84 | <revision date="2014/06/27"> |
| 85 | <change>Moved to community approved after discussion on public_webgl list.</change> |
| 86 | </revision> |
| 87 | <revision date="2014/07/15"> |
| 88 | <change>Added NoInterfaceObject extended attribute.</change> |
| 89 | </revision> |
| 90 | </history> |
| 91 | </extension> |