1// AUTOGENERATED FILE -- DO NOT EDIT -- SEE Makefile 2// 3// WebGL IDL definitions scraped from the Khronos specification: 4// https://www.khronos.org/registry/webgl/specs/latest/ 5 6// Copyright (c) 2018 The Khronos Group Inc. 7// 8// Permission is hereby granted, free of charge, to any person obtaining a 9// copy of this software and/or associated documentation files (the 10// "Materials"), to deal in the Materials without restriction, including 11// without limitation the rights to use, copy, modify, merge, publish, 12// distribute, sublicense, and/or sell copies of the Materials, and to 13// permit persons to whom the Materials are furnished to do so, subject to 14// the following conditions: 15// 16// The above copyright notice and this permission notice shall be included 17// in all copies or substantial portions of the Materials. 18// 19// THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 20// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 21// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 22// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 23// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 24// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 25// MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS. 26 27typedef long long GLint64; 28typedef unsigned long long GLuint64; 29 30 31[Exposed=(Window,Worker)] 32interface WebGLQuery : WebGLObject { 33}; 34 35[Exposed=(Window,Worker)] 36interface WebGLSampler : WebGLObject { 37}; 38 39[Exposed=(Window,Worker)] 40interface WebGLSync : WebGLObject { 41}; 42 43[Exposed=(Window,Worker)] 44interface WebGLTransformFeedback : WebGLObject { 45}; 46 47[Exposed=(Window,Worker)] 48interface WebGLVertexArrayObject : WebGLObject { 49}; 50 51typedef ([AllowShared] Uint32Array or sequence<GLuint>) Uint32List; 52 53interface mixin WebGL2RenderingContextBase 54{ 55 const GLenum READ_BUFFER = 0x0C02; 56 const GLenum UNPACK_ROW_LENGTH = 0x0CF2; 57 const GLenum UNPACK_SKIP_ROWS = 0x0CF3; 58 const GLenum UNPACK_SKIP_PIXELS = 0x0CF4; 59 const GLenum PACK_ROW_LENGTH = 0x0D02; 60 const GLenum PACK_SKIP_ROWS = 0x0D03; 61 const GLenum PACK_SKIP_PIXELS = 0x0D04; 62 const GLenum COLOR = 0x1800; 63 const GLenum DEPTH = 0x1801; 64 const GLenum STENCIL = 0x1802; 65 const GLenum RED = 0x1903; 66 const GLenum RGB8 = 0x8051; 67 const GLenum RGBA8 = 0x8058; 68 const GLenum RGB10_A2 = 0x8059; 69 const GLenum TEXTURE_BINDING_3D = 0x806A; 70 const GLenum UNPACK_SKIP_IMAGES = 0x806D; 71 const GLenum UNPACK_IMAGE_HEIGHT = 0x806E; 72 const GLenum TEXTURE_3D = 0x806F; 73 const GLenum TEXTURE_WRAP_R = 0x8072; 74 const GLenum MAX_3D_TEXTURE_SIZE = 0x8073; 75 const GLenum UNSIGNED_INT_2_10_10_10_REV = 0x8368; 76 const GLenum MAX_ELEMENTS_VERTICES = 0x80E8; 77 const GLenum MAX_ELEMENTS_INDICES = 0x80E9; 78 const GLenum TEXTURE_MIN_LOD = 0x813A; 79 const GLenum TEXTURE_MAX_LOD = 0x813B; 80 const GLenum TEXTURE_BASE_LEVEL = 0x813C; 81 const GLenum TEXTURE_MAX_LEVEL = 0x813D; 82 const GLenum MIN = 0x8007; 83 const GLenum MAX = 0x8008; 84 const GLenum DEPTH_COMPONENT24 = 0x81A6; 85 const GLenum MAX_TEXTURE_LOD_BIAS = 0x84FD; 86 const GLenum TEXTURE_COMPARE_MODE = 0x884C; 87 const GLenum TEXTURE_COMPARE_FUNC = 0x884D; 88 const GLenum CURRENT_QUERY = 0x8865; 89 const GLenum QUERY_RESULT = 0x8866; 90 const GLenum QUERY_RESULT_AVAILABLE = 0x8867; 91 const GLenum STREAM_READ = 0x88E1; 92 const GLenum STREAM_COPY = 0x88E2; 93 const GLenum STATIC_READ = 0x88E5; 94 const GLenum STATIC_COPY = 0x88E6; 95 const GLenum DYNAMIC_READ = 0x88E9; 96 const GLenum DYNAMIC_COPY = 0x88EA; 97 const GLenum MAX_DRAW_BUFFERS = 0x8824; 98 const GLenum DRAW_BUFFER0 = 0x8825; 99 const GLenum DRAW_BUFFER1 = 0x8826; 100 const GLenum DRAW_BUFFER2 = 0x8827; 101 const GLenum DRAW_BUFFER3 = 0x8828; 102 const GLenum DRAW_BUFFER4 = 0x8829; 103 const GLenum DRAW_BUFFER5 = 0x882A; 104 const GLenum DRAW_BUFFER6 = 0x882B; 105 const GLenum DRAW_BUFFER7 = 0x882C; 106 const GLenum DRAW_BUFFER8 = 0x882D; 107 const GLenum DRAW_BUFFER9 = 0x882E; 108 const GLenum DRAW_BUFFER10 = 0x882F; 109 const GLenum DRAW_BUFFER11 = 0x8830; 110 const GLenum DRAW_BUFFER12 = 0x8831; 111 const GLenum DRAW_BUFFER13 = 0x8832; 112 const GLenum DRAW_BUFFER14 = 0x8833; 113 const GLenum DRAW_BUFFER15 = 0x8834; 114 const GLenum MAX_FRAGMENT_UNIFORM_COMPONENTS = 0x8B49; 115 const GLenum MAX_VERTEX_UNIFORM_COMPONENTS = 0x8B4A; 116 const GLenum SAMPLER_3D = 0x8B5F; 117 const GLenum SAMPLER_2D_SHADOW = 0x8B62; 118 const GLenum FRAGMENT_SHADER_DERIVATIVE_HINT = 0x8B8B; 119 const GLenum PIXEL_PACK_BUFFER = 0x88EB; 120 const GLenum PIXEL_UNPACK_BUFFER = 0x88EC; 121 const GLenum PIXEL_PACK_BUFFER_BINDING = 0x88ED; 122 const GLenum PIXEL_UNPACK_BUFFER_BINDING = 0x88EF; 123 const GLenum FLOAT_MAT2x3 = 0x8B65; 124 const GLenum FLOAT_MAT2x4 = 0x8B66; 125 const GLenum FLOAT_MAT3x2 = 0x8B67; 126 const GLenum FLOAT_MAT3x4 = 0x8B68; 127 const GLenum FLOAT_MAT4x2 = 0x8B69; 128 const GLenum FLOAT_MAT4x3 = 0x8B6A; 129 const GLenum SRGB = 0x8C40; 130 const GLenum SRGB8 = 0x8C41; 131 const GLenum SRGB8_ALPHA8 = 0x8C43; 132 const GLenum COMPARE_REF_TO_TEXTURE = 0x884E; 133 const GLenum RGBA32F = 0x8814; 134 const GLenum RGB32F = 0x8815; 135 const GLenum RGBA16F = 0x881A; 136 const GLenum RGB16F = 0x881B; 137 const GLenum VERTEX_ATTRIB_ARRAY_INTEGER = 0x88FD; 138 const GLenum MAX_ARRAY_TEXTURE_LAYERS = 0x88FF; 139 const GLenum MIN_PROGRAM_TEXEL_OFFSET = 0x8904; 140 const GLenum MAX_PROGRAM_TEXEL_OFFSET = 0x8905; 141 const GLenum MAX_VARYING_COMPONENTS = 0x8B4B; 142 const GLenum TEXTURE_2D_ARRAY = 0x8C1A; 143 const GLenum TEXTURE_BINDING_2D_ARRAY = 0x8C1D; 144 const GLenum R11F_G11F_B10F = 0x8C3A; 145 const GLenum UNSIGNED_INT_10F_11F_11F_REV = 0x8C3B; 146 const GLenum RGB9_E5 = 0x8C3D; 147 const GLenum UNSIGNED_INT_5_9_9_9_REV = 0x8C3E; 148 const GLenum TRANSFORM_FEEDBACK_BUFFER_MODE = 0x8C7F; 149 const GLenum MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS = 0x8C80; 150 const GLenum TRANSFORM_FEEDBACK_VARYINGS = 0x8C83; 151 const GLenum TRANSFORM_FEEDBACK_BUFFER_START = 0x8C84; 152 const GLenum TRANSFORM_FEEDBACK_BUFFER_SIZE = 0x8C85; 153 const GLenum TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN = 0x8C88; 154 const GLenum RASTERIZER_DISCARD = 0x8C89; 155 const GLenum MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS = 0x8C8A; 156 const GLenum MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS = 0x8C8B; 157 const GLenum INTERLEAVED_ATTRIBS = 0x8C8C; 158 const GLenum SEPARATE_ATTRIBS = 0x8C8D; 159 const GLenum TRANSFORM_FEEDBACK_BUFFER = 0x8C8E; 160 const GLenum TRANSFORM_FEEDBACK_BUFFER_BINDING = 0x8C8F; 161 const GLenum RGBA32UI = 0x8D70; 162 const GLenum RGB32UI = 0x8D71; 163 const GLenum RGBA16UI = 0x8D76; 164 const GLenum RGB16UI = 0x8D77; 165 const GLenum RGBA8UI = 0x8D7C; 166 const GLenum RGB8UI = 0x8D7D; 167 const GLenum RGBA32I = 0x8D82; 168 const GLenum RGB32I = 0x8D83; 169 const GLenum RGBA16I = 0x8D88; 170 const GLenum RGB16I = 0x8D89; 171 const GLenum RGBA8I = 0x8D8E; 172 const GLenum RGB8I = 0x8D8F; 173 const GLenum RED_INTEGER = 0x8D94; 174 const GLenum RGB_INTEGER = 0x8D98; 175 const GLenum RGBA_INTEGER = 0x8D99; 176 const GLenum SAMPLER_2D_ARRAY = 0x8DC1; 177 const GLenum SAMPLER_2D_ARRAY_SHADOW = 0x8DC4; 178 const GLenum SAMPLER_CUBE_SHADOW = 0x8DC5; 179 const GLenum UNSIGNED_INT_VEC2 = 0x8DC6; 180 const GLenum UNSIGNED_INT_VEC3 = 0x8DC7; 181 const GLenum UNSIGNED_INT_VEC4 = 0x8DC8; 182 const GLenum INT_SAMPLER_2D = 0x8DCA; 183 const GLenum INT_SAMPLER_3D = 0x8DCB; 184 const GLenum INT_SAMPLER_CUBE = 0x8DCC; 185 const GLenum INT_SAMPLER_2D_ARRAY = 0x8DCF; 186 const GLenum UNSIGNED_INT_SAMPLER_2D = 0x8DD2; 187 const GLenum UNSIGNED_INT_SAMPLER_3D = 0x8DD3; 188 const GLenum UNSIGNED_INT_SAMPLER_CUBE = 0x8DD4; 189 const GLenum UNSIGNED_INT_SAMPLER_2D_ARRAY = 0x8DD7; 190 const GLenum DEPTH_COMPONENT32F = 0x8CAC; 191 const GLenum DEPTH32F_STENCIL8 = 0x8CAD; 192 const GLenum FLOAT_32_UNSIGNED_INT_24_8_REV = 0x8DAD; 193 const GLenum FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING = 0x8210; 194 const GLenum FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE = 0x8211; 195 const GLenum FRAMEBUFFER_ATTACHMENT_RED_SIZE = 0x8212; 196 const GLenum FRAMEBUFFER_ATTACHMENT_GREEN_SIZE = 0x8213; 197 const GLenum FRAMEBUFFER_ATTACHMENT_BLUE_SIZE = 0x8214; 198 const GLenum FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE = 0x8215; 199 const GLenum FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE = 0x8216; 200 const GLenum FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE = 0x8217; 201 const GLenum FRAMEBUFFER_DEFAULT = 0x8218; 202 const GLenum DEPTH_STENCIL_ATTACHMENT = 0x821A; 203 const GLenum DEPTH_STENCIL = 0x84F9; 204 const GLenum UNSIGNED_INT_24_8 = 0x84FA; 205 const GLenum DEPTH24_STENCIL8 = 0x88F0; 206 const GLenum UNSIGNED_NORMALIZED = 0x8C17; 207 const GLenum DRAW_FRAMEBUFFER_BINDING = 0x8CA6; /* Same as FRAMEBUFFER_BINDING */ 208 const GLenum READ_FRAMEBUFFER = 0x8CA8; 209 const GLenum DRAW_FRAMEBUFFER = 0x8CA9; 210 const GLenum READ_FRAMEBUFFER_BINDING = 0x8CAA; 211 const GLenum RENDERBUFFER_SAMPLES = 0x8CAB; 212 const GLenum FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER = 0x8CD4; 213 const GLenum MAX_COLOR_ATTACHMENTS = 0x8CDF; 214 const GLenum COLOR_ATTACHMENT1 = 0x8CE1; 215 const GLenum COLOR_ATTACHMENT2 = 0x8CE2; 216 const GLenum COLOR_ATTACHMENT3 = 0x8CE3; 217 const GLenum COLOR_ATTACHMENT4 = 0x8CE4; 218 const GLenum COLOR_ATTACHMENT5 = 0x8CE5; 219 const GLenum COLOR_ATTACHMENT6 = 0x8CE6; 220 const GLenum COLOR_ATTACHMENT7 = 0x8CE7; 221 const GLenum COLOR_ATTACHMENT8 = 0x8CE8; 222 const GLenum COLOR_ATTACHMENT9 = 0x8CE9; 223 const GLenum COLOR_ATTACHMENT10 = 0x8CEA; 224 const GLenum COLOR_ATTACHMENT11 = 0x8CEB; 225 const GLenum COLOR_ATTACHMENT12 = 0x8CEC; 226 const GLenum COLOR_ATTACHMENT13 = 0x8CED; 227 const GLenum COLOR_ATTACHMENT14 = 0x8CEE; 228 const GLenum COLOR_ATTACHMENT15 = 0x8CEF; 229 const GLenum FRAMEBUFFER_INCOMPLETE_MULTISAMPLE = 0x8D56; 230 const GLenum MAX_SAMPLES = 0x8D57; 231 const GLenum HALF_FLOAT = 0x140B; 232 const GLenum RG = 0x8227; 233 const GLenum RG_INTEGER = 0x8228; 234 const GLenum R8 = 0x8229; 235 const GLenum RG8 = 0x822B; 236 const GLenum R16F = 0x822D; 237 const GLenum R32F = 0x822E; 238 const GLenum RG16F = 0x822F; 239 const GLenum RG32F = 0x8230; 240 const GLenum R8I = 0x8231; 241 const GLenum R8UI = 0x8232; 242 const GLenum R16I = 0x8233; 243 const GLenum R16UI = 0x8234; 244 const GLenum R32I = 0x8235; 245 const GLenum R32UI = 0x8236; 246 const GLenum RG8I = 0x8237; 247 const GLenum RG8UI = 0x8238; 248 const GLenum RG16I = 0x8239; 249 const GLenum RG16UI = 0x823A; 250 const GLenum RG32I = 0x823B; 251 const GLenum RG32UI = 0x823C; 252 const GLenum VERTEX_ARRAY_BINDING = 0x85B5; 253 const GLenum R8_SNORM = 0x8F94; 254 const GLenum RG8_SNORM = 0x8F95; 255 const GLenum RGB8_SNORM = 0x8F96; 256 const GLenum RGBA8_SNORM = 0x8F97; 257 const GLenum SIGNED_NORMALIZED = 0x8F9C; 258 const GLenum COPY_READ_BUFFER = 0x8F36; 259 const GLenum COPY_WRITE_BUFFER = 0x8F37; 260 const GLenum COPY_READ_BUFFER_BINDING = 0x8F36; /* Same as COPY_READ_BUFFER */ 261 const GLenum COPY_WRITE_BUFFER_BINDING = 0x8F37; /* Same as COPY_WRITE_BUFFER */ 262 const GLenum UNIFORM_BUFFER = 0x8A11; 263 const GLenum UNIFORM_BUFFER_BINDING = 0x8A28; 264 const GLenum UNIFORM_BUFFER_START = 0x8A29; 265 const GLenum UNIFORM_BUFFER_SIZE = 0x8A2A; 266 const GLenum MAX_VERTEX_UNIFORM_BLOCKS = 0x8A2B; 267 const GLenum MAX_FRAGMENT_UNIFORM_BLOCKS = 0x8A2D; 268 const GLenum MAX_COMBINED_UNIFORM_BLOCKS = 0x8A2E; 269 const GLenum MAX_UNIFORM_BUFFER_BINDINGS = 0x8A2F; 270 const GLenum MAX_UNIFORM_BLOCK_SIZE = 0x8A30; 271 const GLenum MAX_COMBINED_VERTEX_UNIFORM_COMPONENTS = 0x8A31; 272 const GLenum MAX_COMBINED_FRAGMENT_UNIFORM_COMPONENTS = 0x8A33; 273 const GLenum UNIFORM_BUFFER_OFFSET_ALIGNMENT = 0x8A34; 274 const GLenum ACTIVE_UNIFORM_BLOCKS = 0x8A36; 275 const GLenum UNIFORM_TYPE = 0x8A37; 276 const GLenum UNIFORM_SIZE = 0x8A38; 277 const GLenum UNIFORM_BLOCK_INDEX = 0x8A3A; 278 const GLenum UNIFORM_OFFSET = 0x8A3B; 279 const GLenum UNIFORM_ARRAY_STRIDE = 0x8A3C; 280 const GLenum UNIFORM_MATRIX_STRIDE = 0x8A3D; 281 const GLenum UNIFORM_IS_ROW_MAJOR = 0x8A3E; 282 const GLenum UNIFORM_BLOCK_BINDING = 0x8A3F; 283 const GLenum UNIFORM_BLOCK_DATA_SIZE = 0x8A40; 284 const GLenum UNIFORM_BLOCK_ACTIVE_UNIFORMS = 0x8A42; 285 const GLenum UNIFORM_BLOCK_ACTIVE_UNIFORM_INDICES = 0x8A43; 286 const GLenum UNIFORM_BLOCK_REFERENCED_BY_VERTEX_SHADER = 0x8A44; 287 const GLenum UNIFORM_BLOCK_REFERENCED_BY_FRAGMENT_SHADER = 0x8A46; 288 const GLenum INVALID_INDEX = 0xFFFFFFFF; 289 const GLenum MAX_VERTEX_OUTPUT_COMPONENTS = 0x9122; 290 const GLenum MAX_FRAGMENT_INPUT_COMPONENTS = 0x9125; 291 const GLenum MAX_SERVER_WAIT_TIMEOUT = 0x9111; 292 const GLenum OBJECT_TYPE = 0x9112; 293 const GLenum SYNC_CONDITION = 0x9113; 294 const GLenum SYNC_STATUS = 0x9114; 295 const GLenum SYNC_FLAGS = 0x9115; 296 const GLenum SYNC_FENCE = 0x9116; 297 const GLenum SYNC_GPU_COMMANDS_COMPLETE = 0x9117; 298 const GLenum UNSIGNALED = 0x9118; 299 const GLenum SIGNALED = 0x9119; 300 const GLenum ALREADY_SIGNALED = 0x911A; 301 const GLenum TIMEOUT_EXPIRED = 0x911B; 302 const GLenum CONDITION_SATISFIED = 0x911C; 303 const GLenum WAIT_FAILED = 0x911D; 304 const GLenum SYNC_FLUSH_COMMANDS_BIT = 0x00000001; 305 const GLenum VERTEX_ATTRIB_ARRAY_DIVISOR = 0x88FE; 306 const GLenum ANY_SAMPLES_PASSED = 0x8C2F; 307 const GLenum ANY_SAMPLES_PASSED_CONSERVATIVE = 0x8D6A; 308 const GLenum SAMPLER_BINDING = 0x8919; 309 const GLenum RGB10_A2UI = 0x906F; 310 const GLenum INT_2_10_10_10_REV = 0x8D9F; 311 const GLenum TRANSFORM_FEEDBACK = 0x8E22; 312 const GLenum TRANSFORM_FEEDBACK_PAUSED = 0x8E23; 313 const GLenum TRANSFORM_FEEDBACK_ACTIVE = 0x8E24; 314 const GLenum TRANSFORM_FEEDBACK_BINDING = 0x8E25; 315 const GLenum TEXTURE_IMMUTABLE_FORMAT = 0x912F; 316 const GLenum MAX_ELEMENT_INDEX = 0x8D6B; 317 const GLenum TEXTURE_IMMUTABLE_LEVELS = 0x82DF; 318 319 const GLint64 TIMEOUT_IGNORED = -1; 320 321 /* WebGL-specific enums */ 322 const GLenum MAX_CLIENT_WAIT_TIMEOUT_WEBGL = 0x9247; 323 324 /* Buffer objects */ 325 // WebGL1: 326 void bufferData(GLenum target, GLsizeiptr size, GLenum usage); 327 void bufferData(GLenum target, [AllowShared] BufferSource? srcData, GLenum usage); 328 void bufferSubData(GLenum target, GLintptr dstByteOffset, [AllowShared] BufferSource srcData); 329 // WebGL2: 330 void bufferData(GLenum target, [AllowShared] ArrayBufferView srcData, GLenum usage, GLuint srcOffset, 331 optional GLuint length = 0); 332 void bufferSubData(GLenum target, GLintptr dstByteOffset, [AllowShared] ArrayBufferView srcData, 333 GLuint srcOffset, optional GLuint length = 0); 334 335 void copyBufferSubData(GLenum readTarget, GLenum writeTarget, GLintptr readOffset, 336 GLintptr writeOffset, GLsizeiptr size); 337 // MapBufferRange, in particular its read-only and write-only modes, 338 // can not be exposed safely to JavaScript. GetBufferSubData 339 // replaces it for the purpose of fetching data back from the GPU. 340 void getBufferSubData(GLenum target, GLintptr srcByteOffset, [AllowShared] ArrayBufferView dstBuffer, 341 optional GLuint dstOffset = 0, optional GLuint length = 0); 342 343 /* Framebuffer objects */ 344 void blitFramebuffer(GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, 345 GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter); 346 void framebufferTextureLayer(GLenum target, GLenum attachment, WebGLTexture? texture, GLint level, 347 GLint layer); 348 void invalidateFramebuffer(GLenum target, sequence<GLenum> attachments); 349 void invalidateSubFramebuffer(GLenum target, sequence<GLenum> attachments, 350 GLint x, GLint y, GLsizei width, GLsizei height); 351 void readBuffer(GLenum src); 352 353 /* Renderbuffer objects */ 354 any getInternalformatParameter(GLenum target, GLenum internalformat, GLenum pname); 355 void renderbufferStorageMultisample(GLenum target, GLsizei samples, GLenum internalformat, 356 GLsizei width, GLsizei height); 357 358 /* Texture objects */ 359 void texStorage2D(GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, 360 GLsizei height); 361 void texStorage3D(GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, 362 GLsizei height, GLsizei depth); 363 364 // WebGL1 legacy entrypoints: 365 void texImage2D(GLenum target, GLint level, GLint internalformat, 366 GLsizei width, GLsizei height, GLint border, GLenum format, 367 GLenum type, [AllowShared] ArrayBufferView? pixels); 368 void texImage2D(GLenum target, GLint level, GLint internalformat, 369 GLenum format, GLenum type, TexImageSource source); // May throw DOMException 370 371 void texSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, 372 GLsizei width, GLsizei height, 373 GLenum format, GLenum type, [AllowShared] ArrayBufferView? pixels); 374 void texSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, 375 GLenum format, GLenum type, TexImageSource source); // May throw DOMException 376 377 // WebGL2 entrypoints: 378 void texImage2D(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, 379 GLint border, GLenum format, GLenum type, GLintptr pboOffset); 380 void texImage2D(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, 381 GLint border, GLenum format, GLenum type, 382 TexImageSource source); // May throw DOMException 383 void texImage2D(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, 384 GLint border, GLenum format, GLenum type, [AllowShared] ArrayBufferView srcData, 385 GLuint srcOffset); 386 387 void texImage3D(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, 388 GLsizei depth, GLint border, GLenum format, GLenum type, GLintptr pboOffset); 389 void texImage3D(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, 390 GLsizei depth, GLint border, GLenum format, GLenum type, 391 TexImageSource source); // May throw DOMException 392 void texImage3D(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, 393 GLsizei depth, GLint border, GLenum format, GLenum type, [AllowShared] ArrayBufferView? srcData); 394 void texImage3D(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, 395 GLsizei depth, GLint border, GLenum format, GLenum type, [AllowShared] ArrayBufferView srcData, 396 GLuint srcOffset); 397 398 void texSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, 399 GLsizei height, GLenum format, GLenum type, GLintptr pboOffset); 400 void texSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, 401 GLsizei height, GLenum format, GLenum type, 402 TexImageSource source); // May throw DOMException 403 void texSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, 404 GLsizei height, GLenum format, GLenum type, [AllowShared] ArrayBufferView srcData, 405 GLuint srcOffset); 406 407 void texSubImage3D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, 408 GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, 409 GLintptr pboOffset); 410 void texSubImage3D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, 411 GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, 412 TexImageSource source); // May throw DOMException 413 void texSubImage3D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, 414 GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, 415 [AllowShared] ArrayBufferView? srcData, optional GLuint srcOffset = 0); 416 417 void copyTexSubImage3D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, 418 GLint x, GLint y, GLsizei width, GLsizei height); 419 420 void compressedTexImage2D(GLenum target, GLint level, GLenum internalformat, GLsizei width, 421 GLsizei height, GLint border, GLsizei imageSize, GLintptr offset); 422 void compressedTexImage2D(GLenum target, GLint level, GLenum internalformat, GLsizei width, 423 GLsizei height, GLint border, [AllowShared] ArrayBufferView srcData, 424 optional GLuint srcOffset = 0, optional GLuint srcLengthOverride = 0); 425 426 void compressedTexImage3D(GLenum target, GLint level, GLenum internalformat, GLsizei width, 427 GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, GLintptr offset); 428 void compressedTexImage3D(GLenum target, GLint level, GLenum internalformat, GLsizei width, 429 GLsizei height, GLsizei depth, GLint border, [AllowShared] ArrayBufferView srcData, 430 optional GLuint srcOffset = 0, optional GLuint srcLengthOverride = 0); 431 432 void compressedTexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, 433 GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, GLintptr offset); 434 void compressedTexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, 435 GLsizei width, GLsizei height, GLenum format, 436 [AllowShared] ArrayBufferView srcData, 437 optional GLuint srcOffset = 0, 438 optional GLuint srcLengthOverride = 0); 439 440 void compressedTexSubImage3D(GLenum target, GLint level, GLint xoffset, GLint yoffset, 441 GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, 442 GLenum format, GLsizei imageSize, GLintptr offset); 443 void compressedTexSubImage3D(GLenum target, GLint level, GLint xoffset, GLint yoffset, 444 GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, 445 GLenum format, [AllowShared] ArrayBufferView srcData, 446 optional GLuint srcOffset = 0, 447 optional GLuint srcLengthOverride = 0); 448 449 /* Programs and shaders */ 450 [WebGLHandlesContextLoss] GLint getFragDataLocation(WebGLProgram program, DOMString name); 451 452 /* Uniforms */ 453 void uniform1ui(WebGLUniformLocation? location, GLuint v0); 454 void uniform2ui(WebGLUniformLocation? location, GLuint v0, GLuint v1); 455 void uniform3ui(WebGLUniformLocation? location, GLuint v0, GLuint v1, GLuint v2); 456 void uniform4ui(WebGLUniformLocation? location, GLuint v0, GLuint v1, GLuint v2, GLuint v3); 457 458 void uniform1fv(WebGLUniformLocation? location, Float32List data, optional GLuint srcOffset = 0, 459 optional GLuint srcLength = 0); 460 void uniform2fv(WebGLUniformLocation? location, Float32List data, optional GLuint srcOffset = 0, 461 optional GLuint srcLength = 0); 462 void uniform3fv(WebGLUniformLocation? location, Float32List data, optional GLuint srcOffset = 0, 463 optional GLuint srcLength = 0); 464 void uniform4fv(WebGLUniformLocation? location, Float32List data, optional GLuint srcOffset = 0, 465 optional GLuint srcLength = 0); 466 467 void uniform1iv(WebGLUniformLocation? location, Int32List data, optional GLuint srcOffset = 0, 468 optional GLuint srcLength = 0); 469 void uniform2iv(WebGLUniformLocation? location, Int32List data, optional GLuint srcOffset = 0, 470 optional GLuint srcLength = 0); 471 void uniform3iv(WebGLUniformLocation? location, Int32List data, optional GLuint srcOffset = 0, 472 optional GLuint srcLength = 0); 473 void uniform4iv(WebGLUniformLocation? location, Int32List data, optional GLuint srcOffset = 0, 474 optional GLuint srcLength = 0); 475 476 void uniform1uiv(WebGLUniformLocation? location, Uint32List data, optional GLuint srcOffset = 0, 477 optional GLuint srcLength = 0); 478 void uniform2uiv(WebGLUniformLocation? location, Uint32List data, optional GLuint srcOffset = 0, 479 optional GLuint srcLength = 0); 480 void uniform3uiv(WebGLUniformLocation? location, Uint32List data, optional GLuint srcOffset = 0, 481 optional GLuint srcLength = 0); 482 void uniform4uiv(WebGLUniformLocation? location, Uint32List data, optional GLuint srcOffset = 0, 483 optional GLuint srcLength = 0); 484 485 void uniformMatrix2fv(WebGLUniformLocation? location, GLboolean transpose, Float32List data, 486 optional GLuint srcOffset = 0, optional GLuint srcLength = 0); 487 void uniformMatrix3x2fv(WebGLUniformLocation? location, GLboolean transpose, Float32List data, 488 optional GLuint srcOffset = 0, optional GLuint srcLength = 0); 489 void uniformMatrix4x2fv(WebGLUniformLocation? location, GLboolean transpose, Float32List data, 490 optional GLuint srcOffset = 0, optional GLuint srcLength = 0); 491 492 void uniformMatrix2x3fv(WebGLUniformLocation? location, GLboolean transpose, Float32List data, 493 optional GLuint srcOffset = 0, optional GLuint srcLength = 0); 494 void uniformMatrix3fv(WebGLUniformLocation? location, GLboolean transpose, Float32List data, 495 optional GLuint srcOffset = 0, optional GLuint srcLength = 0); 496 void uniformMatrix4x3fv(WebGLUniformLocation? location, GLboolean transpose, Float32List data, 497 optional GLuint srcOffset = 0, optional GLuint srcLength = 0); 498 499 void uniformMatrix2x4fv(WebGLUniformLocation? location, GLboolean transpose, Float32List data, 500 optional GLuint srcOffset = 0, optional GLuint srcLength = 0); 501 void uniformMatrix3x4fv(WebGLUniformLocation? location, GLboolean transpose, Float32List data, 502 optional GLuint srcOffset = 0, optional GLuint srcLength = 0); 503 void uniformMatrix4fv(WebGLUniformLocation? location, GLboolean transpose, Float32List data, 504 optional GLuint srcOffset = 0, optional GLuint srcLength = 0); 505 506 /* Vertex attribs */ 507 void vertexAttribI4i(GLuint index, GLint x, GLint y, GLint z, GLint w); 508 void vertexAttribI4iv(GLuint index, Int32List values); 509 void vertexAttribI4ui(GLuint index, GLuint x, GLuint y, GLuint z, GLuint w); 510 void vertexAttribI4uiv(GLuint index, Uint32List values); 511 void vertexAttribIPointer(GLuint index, GLint size, GLenum type, GLsizei stride, GLintptr offset); 512 513 /* Writing to the drawing buffer */ 514 void vertexAttribDivisor(GLuint index, GLuint divisor); 515 void drawArraysInstanced(GLenum mode, GLint first, GLsizei count, GLsizei instanceCount); 516 void drawElementsInstanced(GLenum mode, GLsizei count, GLenum type, GLintptr offset, GLsizei instanceCount); 517 void drawRangeElements(GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, GLintptr offset); 518 519 /* Reading back pixels */ 520 // WebGL1: 521 void readPixels(GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, 522 [AllowShared] ArrayBufferView? dstData); 523 // WebGL2: 524 void readPixels(GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, 525 GLintptr offset); 526 void readPixels(GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, 527 [AllowShared] ArrayBufferView dstData, GLuint dstOffset); 528 529 /* Multiple Render Targets */ 530 void drawBuffers(sequence<GLenum> buffers); 531 532 void clearBufferfv(GLenum buffer, GLint drawbuffer, Float32List values, 533 optional GLuint srcOffset = 0); 534 void clearBufferiv(GLenum buffer, GLint drawbuffer, Int32List values, 535 optional GLuint srcOffset = 0); 536 void clearBufferuiv(GLenum buffer, GLint drawbuffer, Uint32List values, 537 optional GLuint srcOffset = 0); 538 539 void clearBufferfi(GLenum buffer, GLint drawbuffer, GLfloat depth, GLint stencil); 540 541 /* Query Objects */ 542 WebGLQuery? createQuery(); 543 void deleteQuery(WebGLQuery? query); 544 [WebGLHandlesContextLoss] GLboolean isQuery(WebGLQuery? query); 545 void beginQuery(GLenum target, WebGLQuery query); 546 void endQuery(GLenum target); 547 WebGLQuery? getQuery(GLenum target, GLenum pname); 548 any getQueryParameter(WebGLQuery query, GLenum pname); 549 550 /* Sampler Objects */ 551 WebGLSampler? createSampler(); 552 void deleteSampler(WebGLSampler? sampler); 553 [WebGLHandlesContextLoss] GLboolean isSampler(WebGLSampler? sampler); 554 void bindSampler(GLuint unit, WebGLSampler? sampler); 555 void samplerParameteri(WebGLSampler sampler, GLenum pname, GLint param); 556 void samplerParameterf(WebGLSampler sampler, GLenum pname, GLfloat param); 557 any getSamplerParameter(WebGLSampler sampler, GLenum pname); 558 559 /* Sync objects */ 560 WebGLSync? fenceSync(GLenum condition, GLbitfield flags); 561 [WebGLHandlesContextLoss] GLboolean isSync(WebGLSync? sync); 562 void deleteSync(WebGLSync? sync); 563 GLenum clientWaitSync(WebGLSync sync, GLbitfield flags, GLuint64 timeout); 564 void waitSync(WebGLSync sync, GLbitfield flags, GLint64 timeout); 565 any getSyncParameter(WebGLSync sync, GLenum pname); 566 567 /* Transform Feedback */ 568 WebGLTransformFeedback? createTransformFeedback(); 569 void deleteTransformFeedback(WebGLTransformFeedback? tf); 570 [WebGLHandlesContextLoss] GLboolean isTransformFeedback(WebGLTransformFeedback? tf); 571 void bindTransformFeedback (GLenum target, WebGLTransformFeedback? tf); 572 void beginTransformFeedback(GLenum primitiveMode); 573 void endTransformFeedback(); 574 void transformFeedbackVaryings(WebGLProgram program, sequence<DOMString> varyings, GLenum bufferMode); 575 WebGLActiveInfo? getTransformFeedbackVarying(WebGLProgram program, GLuint index); 576 void pauseTransformFeedback(); 577 void resumeTransformFeedback(); 578 579 /* Uniform Buffer Objects and Transform Feedback Buffers */ 580 void bindBufferBase(GLenum target, GLuint index, WebGLBuffer? buffer); 581 void bindBufferRange(GLenum target, GLuint index, WebGLBuffer? buffer, GLintptr offset, GLsizeiptr size); 582 any getIndexedParameter(GLenum target, GLuint index); 583 sequence<GLuint>? getUniformIndices(WebGLProgram program, sequence<DOMString> uniformNames); 584 any getActiveUniforms(WebGLProgram program, sequence<GLuint> uniformIndices, GLenum pname); 585 GLuint getUniformBlockIndex(WebGLProgram program, DOMString uniformBlockName); 586 any getActiveUniformBlockParameter(WebGLProgram program, GLuint uniformBlockIndex, GLenum pname); 587 DOMString? getActiveUniformBlockName(WebGLProgram program, GLuint uniformBlockIndex); 588 void uniformBlockBinding(WebGLProgram program, GLuint uniformBlockIndex, GLuint uniformBlockBinding); 589 590 /* Vertex Array Objects */ 591 WebGLVertexArrayObject? createVertexArray(); 592 void deleteVertexArray(WebGLVertexArrayObject? vertexArray); 593 [WebGLHandlesContextLoss] GLboolean isVertexArray(WebGLVertexArrayObject? vertexArray); 594 void bindVertexArray(WebGLVertexArrayObject? array); 595}; 596 597[Exposed=(Window,Worker)] 598interface WebGL2RenderingContext 599{ 600}; 601WebGL2RenderingContext includes WebGLRenderingContextBase; 602WebGL2RenderingContext includes WebGL2RenderingContextBase; 603 604 605