[Web IDL] Pass even more types by reference
[WebKit-https.git] / Source / WebCore / html / canvas / WebGL2RenderingContext.idl
1 /*
2  * Copyright (C) 2015 Apple Inc. All rights reserved.
3  *
4  * Redistribution and use in source and binary forms, with or without
5  * modification, are permitted provided that the following conditions
6  * are met:
7  * 1. Redistributions of source code must retain the above copyright
8  *    notice, this list of conditions and the following disclaimer.
9  * 2. Redistributions in binary form must reproduce the above copyright
10  *    notice, this list of conditions and the following disclaimer in the
11  *    documentation and/or other materials provided with the distribution.
12  *
13  * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
14  * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
15  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
16  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE INC. OR
17  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
18  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
19  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
20  * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
21  * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
22  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
23  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
24  */
25
26 typedef unsigned long      GLenum;
27 typedef boolean            GLboolean;
28 typedef unsigned long      GLbitfield;
29 typedef byte               GLbyte;
30 typedef short              GLshort;
31 typedef long               GLint;
32 typedef long               GLsizei;
33 typedef long long          GLintptr;
34 typedef long long          GLsizeiptr;
35 typedef long long          GLint64;
36 typedef octet              GLubyte;
37 typedef unsigned short     GLushort;
38 typedef unsigned long      GLuint;
39 typedef unsigned long long GLuint64;
40 typedef unrestricted float GLfloat;
41 typedef unrestricted float GLclampf;
42
43 [
44     Conditional=WEBGL2,
45     EnabledAtRuntime=WebGL2,
46     JSCustomMarkFunction,
47     DoNotCheckConstants,
48 ] interface WebGL2RenderingContext : WebGLRenderingContextBase {
49     const GLenum READ_BUFFER                                   = 0x0C02;
50     const GLenum UNPACK_ROW_LENGTH                             = 0x0CF2;
51     const GLenum UNPACK_SKIP_ROWS                              = 0x0CF3;
52     const GLenum UNPACK_SKIP_PIXELS                            = 0x0CF4;
53     const GLenum PACK_ROW_LENGTH                               = 0x0D02;
54     const GLenum PACK_SKIP_ROWS                                = 0x0D03;
55     const GLenum PACK_SKIP_PIXELS                              = 0x0D04;
56     const GLenum COLOR                                         = 0x1800;
57     const GLenum DEPTH                                         = 0x1801;
58     const GLenum STENCIL                                       = 0x1802;
59     const GLenum RED                                           = 0x1903;
60     const GLenum RGB8                                          = 0x8051;
61     const GLenum RGBA8                                         = 0x8058;
62     const GLenum RGB10_A2                                      = 0x8059;
63     const GLenum TEXTURE_BINDING_3D                            = 0x806A;
64     const GLenum UNPACK_SKIP_IMAGES                            = 0x806D;
65     const GLenum UNPACK_IMAGE_HEIGHT                           = 0x806E;
66     const GLenum TEXTURE_3D                                    = 0x806F;
67     const GLenum TEXTURE_WRAP_R                                = 0x8072;
68     const GLenum MAX_3D_TEXTURE_SIZE                           = 0x8073;
69     const GLenum UNSIGNED_INT_2_10_10_10_REV                   = 0x8368;
70     const GLenum MAX_ELEMENTS_VERTICES                         = 0x80E8;
71     const GLenum MAX_ELEMENTS_INDICES                          = 0x80E9;
72     const GLenum TEXTURE_MIN_LOD                               = 0x813A;
73     const GLenum TEXTURE_MAX_LOD                               = 0x813B;
74     const GLenum TEXTURE_BASE_LEVEL                            = 0x813C;
75     const GLenum TEXTURE_MAX_LEVEL                             = 0x813D;
76     const GLenum MIN                                           = 0x8007;
77     const GLenum MAX                                           = 0x8008;
78     const GLenum DEPTH_COMPONENT24                             = 0x81A6;
79     const GLenum MAX_TEXTURE_LOD_BIAS                          = 0x84FD;
80     const GLenum TEXTURE_COMPARE_MODE                          = 0x884C;
81     const GLenum TEXTURE_COMPARE_FUNC                          = 0x884D;
82     const GLenum CURRENT_QUERY                                 = 0x8865;
83     const GLenum QUERY_RESULT                                  = 0x8866;
84     const GLenum QUERY_RESULT_AVAILABLE                        = 0x8867;
85     const GLenum STREAM_READ                                   = 0x88E1;
86     const GLenum STREAM_COPY                                   = 0x88E2;
87     const GLenum STATIC_READ                                   = 0x88E5;
88     const GLenum STATIC_COPY                                   = 0x88E6;
89     const GLenum DYNAMIC_READ                                  = 0x88E9;
90     const GLenum DYNAMIC_COPY                                  = 0x88EA;
91     const GLenum MAX_DRAW_BUFFERS                              = 0x8824;
92     const GLenum DRAW_BUFFER0                                  = 0x8825;
93     const GLenum DRAW_BUFFER1                                  = 0x8826;
94     const GLenum DRAW_BUFFER2                                  = 0x8827;
95     const GLenum DRAW_BUFFER3                                  = 0x8828;
96     const GLenum DRAW_BUFFER4                                  = 0x8829;
97     const GLenum DRAW_BUFFER5                                  = 0x882A;
98     const GLenum DRAW_BUFFER6                                  = 0x882B;
99     const GLenum DRAW_BUFFER7                                  = 0x882C;
100     const GLenum DRAW_BUFFER8                                  = 0x882D;
101     const GLenum DRAW_BUFFER9                                  = 0x882E;
102     const GLenum DRAW_BUFFER10                                 = 0x882F;
103     const GLenum DRAW_BUFFER11                                 = 0x8830;
104     const GLenum DRAW_BUFFER12                                 = 0x8831;
105     const GLenum DRAW_BUFFER13                                 = 0x8832;
106     const GLenum DRAW_BUFFER14                                 = 0x8833;
107     const GLenum DRAW_BUFFER15                                 = 0x8834;
108     const GLenum MAX_FRAGMENT_UNIFORM_COMPONENTS               = 0x8B49;
109     const GLenum MAX_VERTEX_UNIFORM_COMPONENTS                 = 0x8B4A;
110     const GLenum SAMPLER_3D                                    = 0x8B5F;
111     const GLenum SAMPLER_2D_SHADOW                             = 0x8B62;
112     const GLenum FRAGMENT_SHADER_DERIVATIVE_HINT               = 0x8B8B;
113     const GLenum PIXEL_PACK_BUFFER                             = 0x88EB;
114     const GLenum PIXEL_UNPACK_BUFFER                           = 0x88EC;
115     const GLenum PIXEL_PACK_BUFFER_BINDING                     = 0x88ED;
116     const GLenum PIXEL_UNPACK_BUFFER_BINDING                   = 0x88EF;
117     const GLenum FLOAT_MAT2x3                                  = 0x8B65;
118     const GLenum FLOAT_MAT2x4                                  = 0x8B66;
119     const GLenum FLOAT_MAT3x2                                  = 0x8B67;
120     const GLenum FLOAT_MAT3x4                                  = 0x8B68;
121     const GLenum FLOAT_MAT4x2                                  = 0x8B69;
122     const GLenum FLOAT_MAT4x3                                  = 0x8B6A;
123     const GLenum SRGB                                          = 0x8C40;
124     const GLenum SRGB8                                         = 0x8C41;
125     const GLenum SRGB8_ALPHA8                                  = 0x8C43;
126     const GLenum COMPARE_REF_TO_TEXTURE                        = 0x884E;
127     const GLenum RGBA32F                                       = 0x8814;
128     const GLenum RGB32F                                        = 0x8815;
129     const GLenum RGBA16F                                       = 0x881A;
130     const GLenum RGB16F                                        = 0x881B;
131     const GLenum VERTEX_ATTRIB_ARRAY_INTEGER                   = 0x88FD;
132     const GLenum MAX_ARRAY_TEXTURE_LAYERS                      = 0x88FF;
133     const GLenum MIN_PROGRAM_TEXEL_OFFSET                      = 0x8904;
134     const GLenum MAX_PROGRAM_TEXEL_OFFSET                      = 0x8905;
135     const GLenum MAX_VARYING_COMPONENTS                        = 0x8B4B;
136     const GLenum TEXTURE_2D_ARRAY                              = 0x8C1A;
137     const GLenum TEXTURE_BINDING_2D_ARRAY                      = 0x8C1D;
138     const GLenum R11F_G11F_B10F                                = 0x8C3A;
139     const GLenum UNSIGNED_INT_10F_11F_11F_REV                  = 0x8C3B;
140     const GLenum RGB9_E5                                       = 0x8C3D;
141     const GLenum UNSIGNED_INT_5_9_9_9_REV                      = 0x8C3E;
142     const GLenum TRANSFORM_FEEDBACK_BUFFER_MODE                = 0x8C7F;
143     const GLenum MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS    = 0x8C80;
144     const GLenum TRANSFORM_FEEDBACK_VARYINGS                   = 0x8C83;
145     const GLenum TRANSFORM_FEEDBACK_BUFFER_START               = 0x8C84;
146     const GLenum TRANSFORM_FEEDBACK_BUFFER_SIZE                = 0x8C85;
147     const GLenum TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN         = 0x8C88;
148     const GLenum RASTERIZER_DISCARD                            = 0x8C89;
149     const GLenum MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS = 0x8C8A;
150     const GLenum MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS       = 0x8C8B;
151     const GLenum INTERLEAVED_ATTRIBS                           = 0x8C8C;
152     const GLenum SEPARATE_ATTRIBS                              = 0x8C8D;
153     const GLenum TRANSFORM_FEEDBACK_BUFFER                     = 0x8C8E;
154     const GLenum TRANSFORM_FEEDBACK_BUFFER_BINDING             = 0x8C8F;
155     const GLenum RGBA32UI                                      = 0x8D70;
156     const GLenum RGB32UI                                       = 0x8D71;
157     const GLenum RGBA16UI                                      = 0x8D76;
158     const GLenum RGB16UI                                       = 0x8D77;
159     const GLenum RGBA8UI                                       = 0x8D7C;
160     const GLenum RGB8UI                                        = 0x8D7D;
161     const GLenum RGBA32I                                       = 0x8D82;
162     const GLenum RGB32I                                        = 0x8D83;
163     const GLenum RGBA16I                                       = 0x8D88;
164     const GLenum RGB16I                                        = 0x8D89;
165     const GLenum RGBA8I                                        = 0x8D8E;
166     const GLenum RGB8I                                         = 0x8D8F;
167     const GLenum RED_INTEGER                                   = 0x8D94;
168     const GLenum RGB_INTEGER                                   = 0x8D98;
169     const GLenum RGBA_INTEGER                                  = 0x8D99;
170     const GLenum SAMPLER_2D_ARRAY                              = 0x8DC1;
171     const GLenum SAMPLER_2D_ARRAY_SHADOW                       = 0x8DC4;
172     const GLenum SAMPLER_CUBE_SHADOW                           = 0x8DC5;
173     const GLenum UNSIGNED_INT_VEC2                             = 0x8DC6;
174     const GLenum UNSIGNED_INT_VEC3                             = 0x8DC7;
175     const GLenum UNSIGNED_INT_VEC4                             = 0x8DC8;
176     const GLenum INT_SAMPLER_2D                                = 0x8DCA;
177     const GLenum INT_SAMPLER_3D                                = 0x8DCB;
178     const GLenum INT_SAMPLER_CUBE                              = 0x8DCC;
179     const GLenum INT_SAMPLER_2D_ARRAY                          = 0x8DCF;
180     const GLenum UNSIGNED_INT_SAMPLER_2D                       = 0x8DD2;
181     const GLenum UNSIGNED_INT_SAMPLER_3D                       = 0x8DD3;
182     const GLenum UNSIGNED_INT_SAMPLER_CUBE                     = 0x8DD4;
183     const GLenum UNSIGNED_INT_SAMPLER_2D_ARRAY                 = 0x8DD7;
184     const GLenum DEPTH_COMPONENT32F                            = 0x8CAC;
185     const GLenum DEPTH32F_STENCIL8                             = 0x8CAD;
186     const GLenum FLOAT_32_UNSIGNED_INT_24_8_REV                = 0x8DAD;
187     const GLenum FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING         = 0x8210;
188     const GLenum FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE         = 0x8211;
189     const GLenum FRAMEBUFFER_ATTACHMENT_RED_SIZE               = 0x8212;
190     const GLenum FRAMEBUFFER_ATTACHMENT_GREEN_SIZE             = 0x8213;
191     const GLenum FRAMEBUFFER_ATTACHMENT_BLUE_SIZE              = 0x8214;
192     const GLenum FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE             = 0x8215;
193     const GLenum FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE             = 0x8216;
194     const GLenum FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE           = 0x8217;
195     const GLenum FRAMEBUFFER_DEFAULT                           = 0x8218;
196     const GLenum DEPTH_STENCIL_ATTACHMENT                      = 0x821A;
197     const GLenum DEPTH_STENCIL                                 = 0x84F9;
198     const GLenum UNSIGNED_INT_24_8                             = 0x84FA;
199     const GLenum DEPTH24_STENCIL8                              = 0x88F0;
200     const GLenum UNSIGNED_NORMALIZED                           = 0x8C17;
201     const GLenum DRAW_FRAMEBUFFER_BINDING                      = 0x8CA6; /* Same as FRAMEBUFFER_BINDING */
202     const GLenum READ_FRAMEBUFFER                              = 0x8CA8;
203     const GLenum DRAW_FRAMEBUFFER                              = 0x8CA9;
204     const GLenum READ_FRAMEBUFFER_BINDING                      = 0x8CAA;
205     const GLenum RENDERBUFFER_SAMPLES                          = 0x8CAB;
206     const GLenum FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER          = 0x8CD4;
207     const GLenum MAX_COLOR_ATTACHMENTS                         = 0x8CDF;
208     const GLenum COLOR_ATTACHMENT1                             = 0x8CE1;
209     const GLenum COLOR_ATTACHMENT2                             = 0x8CE2;
210     const GLenum COLOR_ATTACHMENT3                             = 0x8CE3;
211     const GLenum COLOR_ATTACHMENT4                             = 0x8CE4;
212     const GLenum COLOR_ATTACHMENT5                             = 0x8CE5;
213     const GLenum COLOR_ATTACHMENT6                             = 0x8CE6;
214     const GLenum COLOR_ATTACHMENT7                             = 0x8CE7;
215     const GLenum COLOR_ATTACHMENT8                             = 0x8CE8;
216     const GLenum COLOR_ATTACHMENT9                             = 0x8CE9;
217     const GLenum COLOR_ATTACHMENT10                            = 0x8CEA;
218     const GLenum COLOR_ATTACHMENT11                            = 0x8CEB;
219     const GLenum COLOR_ATTACHMENT12                            = 0x8CEC;
220     const GLenum COLOR_ATTACHMENT13                            = 0x8CED;
221     const GLenum COLOR_ATTACHMENT14                            = 0x8CEE;
222     const GLenum COLOR_ATTACHMENT15                            = 0x8CEF;
223     const GLenum FRAMEBUFFER_INCOMPLETE_MULTISAMPLE            = 0x8D56;
224     const GLenum MAX_SAMPLES                                   = 0x8D57;
225     const GLenum HALF_FLOAT                                    = 0x140B;
226     const GLenum RG                                            = 0x8227;
227     const GLenum RG_INTEGER                                    = 0x8228;
228     const GLenum R8                                            = 0x8229;
229     const GLenum RG8                                           = 0x822B;
230     const GLenum R16F                                          = 0x822D;
231     const GLenum R32F                                          = 0x822E;
232     const GLenum RG16F                                         = 0x822F;
233     const GLenum RG32F                                         = 0x8230;
234     const GLenum R8I                                           = 0x8231;
235     const GLenum R8UI                                          = 0x8232;
236     const GLenum R16I                                          = 0x8233;
237     const GLenum R16UI                                         = 0x8234;
238     const GLenum R32I                                          = 0x8235;
239     const GLenum R32UI                                         = 0x8236;
240     const GLenum RG8I                                          = 0x8237;
241     const GLenum RG8UI                                         = 0x8238;
242     const GLenum RG16I                                         = 0x8239;
243     const GLenum RG16UI                                        = 0x823A;
244     const GLenum RG32I                                         = 0x823B;
245     const GLenum RG32UI                                        = 0x823C;
246     const GLenum VERTEX_ARRAY_BINDING                          = 0x85B5;
247     const GLenum R8_SNORM                                      = 0x8F94;
248     const GLenum RG8_SNORM                                     = 0x8F95;
249     const GLenum RGB8_SNORM                                    = 0x8F96;
250     const GLenum RGBA8_SNORM                                   = 0x8F97;
251     const GLenum SIGNED_NORMALIZED                             = 0x8F9C;
252     const GLenum PRIMITIVE_RESTART_FIXED_INDEX                 = 0x8D69;
253     const GLenum COPY_READ_BUFFER                              = 0x8F36;
254     const GLenum COPY_WRITE_BUFFER                             = 0x8F37;
255     const GLenum COPY_READ_BUFFER_BINDING                      = 0x8F36; /* Same as COPY_READ_BUFFER */
256     const GLenum COPY_WRITE_BUFFER_BINDING                     = 0x8F37; /* Same as COPY_WRITE_BUFFER */
257     const GLenum UNIFORM_BUFFER                                = 0x8A11;
258     const GLenum UNIFORM_BUFFER_BINDING                        = 0x8A28;
259     const GLenum UNIFORM_BUFFER_START                          = 0x8A29;
260     const GLenum UNIFORM_BUFFER_SIZE                           = 0x8A2A;
261     const GLenum MAX_VERTEX_UNIFORM_BLOCKS                     = 0x8A2B;
262     const GLenum MAX_FRAGMENT_UNIFORM_BLOCKS                   = 0x8A2D;
263     const GLenum MAX_COMBINED_UNIFORM_BLOCKS                   = 0x8A2E;
264     const GLenum MAX_UNIFORM_BUFFER_BINDINGS                   = 0x8A2F;
265     const GLenum MAX_UNIFORM_BLOCK_SIZE                        = 0x8A30;
266     const GLenum MAX_COMBINED_VERTEX_UNIFORM_COMPONENTS        = 0x8A31;
267     const GLenum MAX_COMBINED_FRAGMENT_UNIFORM_COMPONENTS      = 0x8A33;
268     const GLenum UNIFORM_BUFFER_OFFSET_ALIGNMENT               = 0x8A34;
269     const GLenum ACTIVE_UNIFORM_BLOCKS                         = 0x8A36;
270     const GLenum UNIFORM_TYPE                                  = 0x8A37;
271     const GLenum UNIFORM_SIZE                                  = 0x8A38;
272     const GLenum UNIFORM_BLOCK_INDEX                           = 0x8A3A;
273     const GLenum UNIFORM_OFFSET                                = 0x8A3B;
274     const GLenum UNIFORM_ARRAY_STRIDE                          = 0x8A3C;
275     const GLenum UNIFORM_MATRIX_STRIDE                         = 0x8A3D;
276     const GLenum UNIFORM_IS_ROW_MAJOR                          = 0x8A3E;
277     const GLenum UNIFORM_BLOCK_BINDING                         = 0x8A3F;
278     const GLenum UNIFORM_BLOCK_DATA_SIZE                       = 0x8A40;
279     const GLenum UNIFORM_BLOCK_ACTIVE_UNIFORMS                 = 0x8A42;
280     const GLenum UNIFORM_BLOCK_ACTIVE_UNIFORM_INDICES          = 0x8A43;
281     const GLenum UNIFORM_BLOCK_REFERENCED_BY_VERTEX_SHADER     = 0x8A44;
282     const GLenum UNIFORM_BLOCK_REFERENCED_BY_FRAGMENT_SHADER   = 0x8A46;
283     const GLenum INVALID_INDEX                                 = 0xFFFFFFFF;
284     const GLenum MAX_VERTEX_OUTPUT_COMPONENTS                  = 0x9122;
285     const GLenum MAX_FRAGMENT_INPUT_COMPONENTS                 = 0x9125;
286     const GLenum MAX_SERVER_WAIT_TIMEOUT                       = 0x9111;
287     const GLenum OBJECT_TYPE                                   = 0x9112;
288     const GLenum SYNC_CONDITION                                = 0x9113;
289     const GLenum SYNC_STATUS                                   = 0x9114;
290     const GLenum SYNC_FLAGS                                    = 0x9115;
291     const GLenum SYNC_FENCE                                    = 0x9116;
292     const GLenum SYNC_GPU_COMMANDS_COMPLETE                    = 0x9117;
293     const GLenum UNSIGNALED                                    = 0x9118;
294     const GLenum SIGNALED                                      = 0x9119;
295     const GLenum ALREADY_SIGNALED                              = 0x911A;
296     const GLenum TIMEOUT_EXPIRED                               = 0x911B;
297     const GLenum CONDITION_SATISFIED                           = 0x911C;
298     const GLenum WAIT_FAILED                                   = 0x911D;
299     const GLenum SYNC_FLUSH_COMMANDS_BIT                       = 0x00000001;
300     const GLenum VERTEX_ATTRIB_ARRAY_DIVISOR                   = 0x88FE;
301     const GLenum ANY_SAMPLES_PASSED                            = 0x8C2F;
302     const GLenum ANY_SAMPLES_PASSED_CONSERVATIVE               = 0x8D6A;
303     const GLenum SAMPLER_BINDING                               = 0x8919;
304     const GLenum RGB10_A2UI                                    = 0x906F;
305     const GLenum TEXTURE_SWIZZLE_R                             = 0x8E42;
306     const GLenum TEXTURE_SWIZZLE_G                             = 0x8E43;
307     const GLenum TEXTURE_SWIZZLE_B                             = 0x8E44;
308     const GLenum TEXTURE_SWIZZLE_A                             = 0x8E45;
309     const GLenum GREEN                                         = 0x1904;
310     const GLenum BLUE                                          = 0x1905;
311     const GLenum INT_2_10_10_10_REV                            = 0x8D9F;
312     const GLenum TRANSFORM_FEEDBACK                            = 0x8E22;
313     const GLenum TRANSFORM_FEEDBACK_PAUSED                     = 0x8E23;
314     const GLenum TRANSFORM_FEEDBACK_ACTIVE                     = 0x8E24;
315     const GLenum TRANSFORM_FEEDBACK_BINDING                    = 0x8E25;
316     const GLenum COMPRESSED_R11_EAC                            = 0x9270;
317     const GLenum COMPRESSED_SIGNED_R11_EAC                     = 0x9271;
318     const GLenum COMPRESSED_RG11_EAC                           = 0x9272;
319     const GLenum COMPRESSED_SIGNED_RG11_EAC                    = 0x9273;
320     const GLenum COMPRESSED_RGB8_ETC2                          = 0x9274;
321     const GLenum COMPRESSED_SRGB8_ETC2                         = 0x9275;
322     const GLenum COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2      = 0x9276;
323     const GLenum COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2     = 0x9277;
324     const GLenum COMPRESSED_RGBA8_ETC2_EAC                     = 0x9278;
325     const GLenum COMPRESSED_SRGB8_ALPHA8_ETC2_EAC              = 0x9279;
326     const GLenum TEXTURE_IMMUTABLE_FORMAT                      = 0x912F;
327     const GLenum MAX_ELEMENT_INDEX                             = 0x8D6B;
328     const GLenum NUM_SAMPLE_COUNTS                             = 0x9380;
329     const GLenum TEXTURE_IMMUTABLE_LEVELS                      = 0x82DF;
330     const GLenum VERTEX_ATTRIB_ARRAY_DIVISOR_ANGLE             = 0x88FE;
331
332     const GLuint64 TIMEOUT_IGNORED                             = 0xFFFFFFFFFFFFFFFF;
333
334     /* Buffer objects */
335     [StrictTypeChecking] void copyBufferSubData(GLenum readTarget, GLenum writeTarget, GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size);
336     // MapBufferRange, in particular its read-only and write-only modes,
337     // can not be exposed safely to JavaScript. GetBufferSubData
338     // replaces it for the purpose of fetching data back from the GPU.
339     [StrictTypeChecking] void getBufferSubData(GLenum target, GLintptr offset, ArrayBuffer? returnedData);
340
341     /* Framebuffer objects */
342     [StrictTypeChecking] void blitFramebuffer(GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter);
343     [StrictTypeChecking] void framebufferTextureLayer(GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer);
344     [StrictTypeChecking, Custom] any getInternalformatParameter(GLenum target, GLenum internalformat, GLenum pname);
345     [StrictTypeChecking] void invalidateFramebuffer(GLenum target, sequence<GLenum> attachments);
346     [StrictTypeChecking] void invalidateSubFramebuffer(GLenum target, sequence<GLenum> attachments, GLint x, GLint y, GLsizei width, GLsizei height);
347     [StrictTypeChecking] void readBuffer(GLenum src);
348
349     /* Renderbuffer objects */
350     [StrictTypeChecking] void renderbufferStorageMultisample(GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);
351
352     /* Texture objects */
353     [StrictTypeChecking] void texStorage2D(GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height);
354     [StrictTypeChecking] void texStorage3D(GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth);
355     [StrictTypeChecking] void texImage3D(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, ArrayBufferView? pixels);
356     [StrictTypeChecking] void texSubImage3D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, ArrayBufferView? pixels);
357     [StrictTypeChecking] void texSubImage3D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLenum format, GLenum type, ImageData? source);
358     [StrictTypeChecking] void texSubImage3D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLenum format, GLenum type, HTMLImageElement? source);
359     [StrictTypeChecking] void texSubImage3D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLenum format, GLenum type, HTMLCanvasElement? source);
360     [StrictTypeChecking] void texSubImage3D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLenum format, GLenum type, HTMLVideoElement? source);
361     [StrictTypeChecking] void copyTexSubImage3D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height);
362     [StrictTypeChecking] void compressedTexImage3D(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, ArrayBufferView? data);
363     [StrictTypeChecking] void compressedTexSubImage3D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, ArrayBufferView? data);
364
365     /* Programs and shaders */
366     [StrictTypeChecking] GLint getFragDataLocation(WebGLProgram? program, DOMString name);
367
368     /* Uniforms and attributes */
369     [StrictTypeChecking] void uniform1ui(WebGLUniformLocation? location, GLuint v0);
370     [StrictTypeChecking] void uniform2ui(WebGLUniformLocation? location, GLuint v0, GLuint v1);
371     [StrictTypeChecking] void uniform3ui(WebGLUniformLocation? location, GLuint v0, GLuint v1, GLuint v2);
372     [StrictTypeChecking] void uniform4ui(WebGLUniformLocation? location, GLuint v0, GLuint v1, GLuint v2, GLuint v3);
373     [StrictTypeChecking] void uniform1uiv(WebGLUniformLocation? location, Uint32Array? value);
374     [StrictTypeChecking] void uniform2uiv(WebGLUniformLocation? location, Uint32Array? value);
375     [StrictTypeChecking] void uniform3uiv(WebGLUniformLocation? location, Uint32Array? value);
376     [StrictTypeChecking] void uniform4uiv(WebGLUniformLocation? location, Uint32Array? value);
377     [StrictTypeChecking] void uniformMatrix2x3fv(WebGLUniformLocation? location, GLboolean transpose, Float32Array? value);
378     [StrictTypeChecking] void uniformMatrix3x2fv(WebGLUniformLocation? location, GLboolean transpose, Float32Array? value);
379     [StrictTypeChecking] void uniformMatrix2x4fv(WebGLUniformLocation? location, GLboolean transpose, Float32Array? value);
380     [StrictTypeChecking] void uniformMatrix4x2fv(WebGLUniformLocation? location, GLboolean transpose, Float32Array? value);
381     [StrictTypeChecking] void uniformMatrix3x4fv(WebGLUniformLocation? location, GLboolean transpose, Float32Array? value);
382     [StrictTypeChecking] void uniformMatrix4x3fv(WebGLUniformLocation? location, GLboolean transpose, Float32Array? value);
383     [StrictTypeChecking] void vertexAttribI4i(GLuint index, GLint x, GLint y, GLint z, GLint w);
384     [StrictTypeChecking] void vertexAttribI4iv(GLuint index, Int32Array? v);
385     [StrictTypeChecking] void vertexAttribI4ui(GLuint index, GLuint x, GLuint y, GLuint z, GLuint w);
386     [StrictTypeChecking] void vertexAttribI4uiv(GLuint index, Uint32Array? v);
387     [StrictTypeChecking] void vertexAttribIPointer(GLuint index, GLint size, GLenum type, GLsizei stride, GLintptr offset);
388
389     /* Writing to the drawing buffer */
390     [StrictTypeChecking] void vertexAttribDivisor(GLuint index, GLuint divisor);
391     [StrictTypeChecking] void drawArraysInstanced(GLenum mode, GLint first, GLsizei count, GLsizei instanceCount);
392     [StrictTypeChecking] void drawElementsInstanced(GLenum mode, GLsizei count, GLenum type, GLintptr offset, GLsizei instanceCount);
393     [StrictTypeChecking] void drawRangeElements(GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, GLintptr offset);
394
395     /* Multiple Render Targets */
396     [StrictTypeChecking] void drawBuffers(sequence<GLenum> buffers);
397     [StrictTypeChecking] void clearBufferiv(GLenum buffer, GLint drawbuffer, Int32Array? value);
398     [StrictTypeChecking] void clearBufferuiv(GLenum buffer, GLint drawbuffer, Uint32Array? value);
399     [StrictTypeChecking] void clearBufferfv(GLenum buffer, GLint drawbuffer, Float32Array? value);
400     [StrictTypeChecking] void clearBufferfi(GLenum buffer, GLint drawbuffer, GLfloat depth, GLint stencil);
401
402     /* Query Objects */
403     [StrictTypeChecking] WebGLQuery createQuery();
404     [StrictTypeChecking] void deleteQuery(WebGLQuery? query);
405     [StrictTypeChecking] GLboolean isQuery(WebGLQuery? query);
406     [StrictTypeChecking] void beginQuery(GLenum target, WebGLQuery? query);
407     [StrictTypeChecking] void endQuery(GLenum target);
408     [StrictTypeChecking] WebGLQuery getQuery(GLenum target, GLenum pname);
409     [StrictTypeChecking, Custom] any getQueryParameter(WebGLQuery? query, GLenum pname);
410
411     /* Sampler Objects */
412     [StrictTypeChecking] WebGLSampler createSampler();
413     [StrictTypeChecking] void deleteSampler(WebGLSampler? sampler);
414     [StrictTypeChecking] GLboolean isSampler(WebGLSampler? sampler);
415     [StrictTypeChecking] void bindSampler(GLuint unit, WebGLSampler? sampler);
416     [StrictTypeChecking] void samplerParameteri(WebGLSampler? sampler, GLenum pname, GLint param);
417     [StrictTypeChecking] void samplerParameterf(WebGLSampler? sampler, GLenum pname, GLfloat param);
418     [StrictTypeChecking, Custom] any getSamplerParameter(WebGLSampler? sampler, GLenum pname);
419
420     /* Sync objects */
421     [StrictTypeChecking] WebGLSync fenceSync(GLenum condition, GLbitfield flags);
422     [StrictTypeChecking] GLboolean isSync(WebGLSync? sync);
423     [StrictTypeChecking] void deleteSync(WebGLSync? sync);
424     [StrictTypeChecking] GLenum clientWaitSync(WebGLSync? sync, GLbitfield flags, GLuint64 timeout);
425     [StrictTypeChecking] void waitSync(WebGLSync? sync, GLbitfield flags, GLuint64 timeout);
426     [StrictTypeChecking, Custom] any getSyncParameter(WebGLSync? sync, GLenum pname);
427
428     /* Transform Feedback */
429     [StrictTypeChecking] WebGLTransformFeedback createTransformFeedback();
430     [StrictTypeChecking] void deleteTransformFeedback(WebGLTransformFeedback? id);
431     [StrictTypeChecking] GLboolean isTransformFeedback(WebGLTransformFeedback? id);
432     [StrictTypeChecking] void bindTransformFeedback(GLenum target, WebGLTransformFeedback? id);
433     [StrictTypeChecking] void beginTransformFeedback(GLenum primitiveMode);
434     [StrictTypeChecking] void endTransformFeedback();
435     [StrictTypeChecking] void transformFeedbackVaryings(WebGLProgram? program, sequence<DOMString> varyings, GLenum bufferMode);
436     [StrictTypeChecking] WebGLActiveInfo getTransformFeedbackVarying(WebGLProgram? program, GLuint index);
437     [StrictTypeChecking] void pauseTransformFeedback();
438     [StrictTypeChecking] void resumeTransformFeedback();
439
440     /* Uniform Buffer Objects and Transform Feedback Buffers */
441     [StrictTypeChecking] void bindBufferBase(GLenum target, GLuint index, WebGLBuffer? buffer);
442     [StrictTypeChecking] void bindBufferRange(GLenum target, GLuint index, WebGLBuffer? buffer, GLintptr offset, GLsizeiptr size);
443     [StrictTypeChecking, Custom] any getIndexedParameter(GLenum target, GLuint index);
444     [StrictTypeChecking] Uint32Array getUniformIndices(WebGLProgram? program, sequence<DOMString> uniformNames);
445     [StrictTypeChecking] Int32Array getActiveUniforms(WebGLProgram? program, Uint32Array? uniformIndices, GLenum pname);
446     [StrictTypeChecking] GLuint getUniformBlockIndex(WebGLProgram? program, DOMString uniformBlockName);
447     [StrictTypeChecking, Custom] any getActiveUniformBlockParameter(WebGLProgram? program, GLuint uniformBlockIndex, GLenum pname);
448     [StrictTypeChecking, Custom] any getActiveUniformBlockName(WebGLProgram? program, GLuint uniformBlockIndex);
449     [StrictTypeChecking] void uniformBlockBinding(WebGLProgram? program, GLuint uniformBlockIndex, GLuint uniformBlockBinding);
450
451     /* Vertex Array Objects */
452     [StrictTypeChecking] WebGLVertexArrayObject createVertexArray();
453     [StrictTypeChecking] void deleteVertexArray(WebGLVertexArrayObject? vertexArray);
454     [StrictTypeChecking] GLboolean isVertexArray(WebGLVertexArrayObject? vertexArray);
455     [StrictTypeChecking] void bindVertexArray(WebGLVertexArrayObject? vertexArray);
456 };