Debian Codegraph @

api_webgl/extensions/WEBGL_compressed_texture_pvrtc/extension.xml

raw symbols SCIP
1 <?xml version="1.0"?>
2
3 <extension href="WEBGL_compressed_texture_pvrtc/">
4 <name>WEBGL_compressed_texture_pvrtc</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>13</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/IMG/IMG_texture_compression_pvrtc.txt">
19 IMG_texture_compression_pvrtc</a> OpenGL extension to WebGL.
20 </p>
21 <features>
22 <feature>
23 Compression formats <code>COMPRESSED_RGB_PVRTC_4BPPV1_IMG</code>,
24 <code>COMPRESSED_RGB_PVRTC_2BPPV1_IMG</code>, <code>COMPRESSED_RGBA_PVRTC_4BPPV1_IMG</code>, and
25 <code>COMPRESSED_RGBA_PVRTC_2BPPV1_IMG</code> may be passed to
26 the <code>compressedTexImage2D</code> and <code>compressedTexSubImage2D</code> entry points.
27 </feature>
28 <feature>
29 Calling <code>getParameter</code> with the argument <code>COMPRESSED_TEXTURE_FORMATS</code>
30 will include the 4 formats from this specification.
31 </feature>
32 <feature>
33 <p>The following format-specific restrictions apply to all of the formats described
34 by this extension:
35 </p>
36
37 <p>In <code>compressedTexImage2D</code>, the <code>width</code> and <code>height</code>
38 parameters must be powers of two. Otherwise, an INVALID_VALUE error is generated.
39 </p>
40
41 <p>
42 In <code>compressedTexSubImage2D</code>, the <code>width</code> and <code>height</code>
43 parameters must be equal to the current values of the existing texture image, and the
44 <code>xoffset</code> and <code>yoffset</code> parameters must be zero.
45 Otherwise, an INVALID_VALUE error is generated.
46 </p>
47 </feature>
48 <feature>
49 <p>The following format-specific restrictions must also be enforced:</p>
50 <dl>
51 <dt>COMPRESSED_RGB_PVRTC_4BPPV1_IMG</dt>
52 <dt>COMPRESSED_RGBA_PVRTC_4BPPV1_IMG</dt>
53 <dd><p>The <code>byteLength</code> of the ArrayBufferView, <code>pixels</code>, passed to
54 either <code>compressedTexImage2D</code> or <code>compressedTexSubImage2D</code> must be
55 equal to the following number of bytes:</p>
56 <blockquote><code>
57 max(width, 8) * max(height, 8) / 2
58 </code></blockquote>
59 <p>If it is not, an <code>INVALID_VALUE</code> error is generated.</p>
60 </dd>
61
62 <dt>COMPRESSED_RGB_PVRTC_2BPPV1_IMG</dt>
63 <dt>COMPRESSED_RGBA_PVRTC_2BPPV1_IMG</dt>
64 <dd><p>The <code>byteLength</code> of the ArrayBufferView, <code>pixels</code>, passed to
65 either <code>compressedTexImage2D</code> or <code>compressedTexSubImage2D</code> must be
66 equal to the following number of bytes:</p>
67 <blockquote><code>
68 max(width, 16) * max(height, 8) / 4
69 </code></blockquote>
70 <p>If it is not, an <code>INVALID_VALUE</code> error is generated.</p>
71 </dd>
72 </dl>
73 </feature>
74 </features>
75 </overview>
76 <idl xml:space="preserve">
77 [NoInterfaceObject]
78 interface WEBGL_compressed_texture_pvrtc {
79 /* Compressed Texture Formats */
80 const GLenum COMPRESSED_RGB_PVRTC_4BPPV1_IMG = 0x8C00;
81 const GLenum COMPRESSED_RGB_PVRTC_2BPPV1_IMG = 0x8C01;
82 const GLenum COMPRESSED_RGBA_PVRTC_4BPPV1_IMG = 0x8C02;
83 const GLenum COMPRESSED_RGBA_PVRTC_2BPPV1_IMG = 0x8C03;
84 };
85 </idl>
86 <history>
87 <revision date="2012/08/07">
88 <change>Initial revision.</change>
89 </revision>
90 <revision date="2013/07/03">
91 <change>Clarified that length of ArrayBufferView is actually byteLength.</change>
92 </revision>
93 <revision date="2014/06/27">
94 <change>Moved to community approved after discussion on public_webgl list.</change>
95 </revision>
96 <revision date="2014/07/15">
97 <change>Added NoInterfaceObject extended attribute.</change>
98 </revision>
99 </history>
100 </extension>