File: extension.xml

package info (click to toggle)
rust-khronos-api 3.1.0-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 6,704 kB
  • sloc: xml: 114,180; makefile: 4
file content (126 lines) | stat: -rw-r--r-- 5,338 bytes parent folder | download | duplicates (45)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
<?xml version="1.0"?>

<draft href="EXT_texture_compression_rgtc/">
  <name>EXT_texture_compression_rgtc</name>
  <contact>
    <a href="https://www.khronos.org/webgl/public-mailing-list/">WebGL working group</a> (public_webgl 'at' khronos.org)
  </contact>
  <contributors>
    <contributor>Olli Etuaho, NVIDIA</contributor>
    <contributor>Members of the WebGL working group</contributor>
  </contributors>
  <number>39</number>
  <depends>
    <api version="1.0"/>
  </depends>
  <overview>
    <p>
      This extension exposes the compressed texture format defined in the
      <a href="https://www.khronos.org/registry/OpenGL/extensions/EXT/EXT_texture_compression_rgtc.txt">
      EXT_texture_compression_rgtc</a> OpenGL extension to WebGL. Consult that extension
      specification for behavioral definitions, including error behaviors.
    </p>
    <p>
      Updates of partial tiles detailed in the "Implementation Note" section of the
      EXT_texture_compression_rgtc specification must be supported in an implementation of this
      WebGL extension.
    </p>
    <features>
      <feature>
        Compression formats <code>COMPRESSED_RED_RGTC1_EXT</code>,
        <code>COMPRESSED_SIGNED_RED_RGTC1_EXT</code>,
        <code>COMPRESSED_RED_GREEN_RGTC2_EXT</code>,
        and <code>COMPRESSED_SIGNED_RED_GREEN_RGTC2_EXT</code> may be passed to
        the <code>compressedTexImage2D</code> and <code>compressedTexSubImage2D</code> entry points.
      </feature>
      <feature>
        Calling <code>getParameter</code> with the argument <code>COMPRESSED_TEXTURE_FORMATS</code>
        will include the formats from this specification.
      </feature>
      <feature>
        <p>The following format-specific restrictions must be enforced:</p>
        <dl>
          <dt>COMPRESSED_RED_RGTC1_EXT</dt>
          <dt>COMPRESSED_SIGNED_RED_RGTC1_EXT</dt>
          <dd><p>The <code>byteLength</code> of the ArrayBufferView, <code>pixels</code>, passed to
          <code>compressedTexImage2D</code> or <code>compressedTexSubImage2D</code> must be equal to the following number of bytes:</p>
          <blockquote><code>
            ceil(width / 4) * ceil(height / 4) * 8
          </code></blockquote>
          <p>If it is not, an <code>INVALID_VALUE</code> error is generated.</p>
          </dd>
          <dt>COMPRESSED_RED_GREEN_RGTC2_EXT</dt>
          <dt>COMPRESSED_SIGNED_RED_GREEN_RGTC2_EXT</dt>
          <dd><p>The <code>byteLength</code> of the ArrayBufferView, <code>pixels</code>, passed to
          <code>compressedTexImage2D</code> or <code>compressedTexSubImage2D</code> must be equal to the following number of bytes:</p>
          <blockquote><code>
            ceil(width / 4) * ceil(height / 4) * 16
          </code></blockquote>
          <p>If it is not, an <code>INVALID_VALUE</code> error is generated.</p>
          </dd>
          </dl>
      </feature>
    </features>
  </overview>
  <idl xml:space="preserve">
[NoInterfaceObject]
interface EXT_texture_compression_rgtc {
    const GLenum COMPRESSED_RED_RGTC1_EXT = 0x8DBB;
    const GLenum COMPRESSED_SIGNED_RED_RGTC1_EXT = 0x8DBC;
    const GLenum COMPRESSED_RED_GREEN_RGTC2_EXT = 0x8DBD;
    const GLenum COMPRESSED_SIGNED_RED_GREEN_RGTC2_EXT = 0x8DBE;
};
  </idl>

  <newtok>
    <function name="compressedTexImage2D">
      <param name="internalformat" type="GLenum"/>
      Accepted by the <code>internalformat</code> parameter:
      <code>COMPRESSED_RED_RGTC1_EXT</code>,
      <code>COMPRESSED_SIGNED_RED_RGTC1_EXT</code>,
      <code>COMPRESSED_RED_GREEN_RGTC2_EXT</code>,
      <code>COMPRESSED_SIGNED_RED_GREEN_RGTC2_EXT</code>
      <br/>
    </function>

    <function name="compressedTexSubImage2D">
      <param name="internalformat" type="GLenum"/>
      Accepted by the <code>internalformat</code> parameter:
      <code>COMPRESSED_RED_RGTC1_EXT</code>,
      <code>COMPRESSED_SIGNED_RED_RGTC1_EXT</code>,
      <code>COMPRESSED_RED_GREEN_RGTC2_EXT</code>,
      <code>COMPRESSED_SIGNED_RED_GREEN_RGTC2_EXT</code>
      <br/>
    </function>
  </newtok>

  <errors>
    <error enum="INVALID_VALUE">
      The error <code>INVALID_VALUE</code> is generated by <code>compressedTexImage2D</code> and
      <code>compressedTexSubImage2D</code> if the <code>internalformat</code> parameter is
      <code>COMPRESSED_RED_RGTC1_EXT</code> or <code>COMPRESSED_SIGNED_RED_RGTC1_EXT</code>
      and the byteLength of the ArrayBufferView is not:
      <blockquote><code>
        ceil(width / 4) * ceil(height / 4) * 8
      </code></blockquote>
    </error>
    <error enum="INVALID_VALUE">
      The error <code>INVALID_VALUE</code> is generated by <code>compressedTexImage2D</code> and
      <code>compressedTexSubImage2D</code> if the <code>internalformat</code> parameter is
      <code>COMPRESSED_RED_GREEN_RGTC2_EXT</code> or <code>COMPRESSED_SIGNED_RED_GREEN_RGTC2_EXT</code>
      and the byteLength of the ArrayBufferView is not:
      <blockquote><code>
        ceil(width / 4) * ceil(height / 4) * 16
      </code></blockquote>
    </error>
  </errors>

  <history>
    <revision date="2018/09/26">
      <change>Initial revision.</change>
    </revision>
    <revision date="2018/09/26">
      <change>Rename to EXT_texture_compression_rgtc from WEBGL_compressed_texture_rgtc</change>
    </revision>
  </history>
</draft>