1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/dom/webidl/WebGLRenderingContext.webidl Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,961 @@ 1.4 +/* -*- Mode: IDL; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ 1.5 +/* This Source Code Form is subject to the terms of the Mozilla Public 1.6 + * License, v. 2.0. If a copy of the MPL was not distributed with this file, 1.7 + * You can obtain one at http://mozilla.org/MPL/2.0/. 1.8 + * 1.9 + * The origin of this IDL file is 1.10 + * https://www.khronos.org/registry/webgl/specs/latest/webgl.idl 1.11 + * 1.12 + * Copyright © 2012 Khronos Group 1.13 + */ 1.14 + 1.15 +// WebGL IDL definitions scraped from the Khronos specification: 1.16 +// https://www.khronos.org/registry/webgl/specs/latest/ 1.17 +// 1.18 +// This IDL depends on the typed array specification defined at: 1.19 +// https://www.khronos.org/registry/typedarray/specs/latest/typedarrays.idl 1.20 + 1.21 +typedef unsigned long GLenum; 1.22 +typedef boolean GLboolean; 1.23 +typedef unsigned long GLbitfield; 1.24 +typedef byte GLbyte; /* 'byte' should be a signed 8 bit type. */ 1.25 +typedef short GLshort; 1.26 +typedef long GLint; 1.27 +typedef long GLsizei; 1.28 +typedef long long GLintptr; 1.29 +typedef long long GLsizeiptr; 1.30 +// Ideally the typedef below would use 'unsigned byte', but that doesn't currently exist in Web IDL. 1.31 +typedef octet GLubyte; /* 'octet' should be an unsigned 8 bit type. */ 1.32 +typedef unsigned short GLushort; 1.33 +typedef unsigned long GLuint; 1.34 +typedef unrestricted float GLfloat; 1.35 +typedef unrestricted float GLclampf; 1.36 + 1.37 +dictionary WebGLContextAttributes { 1.38 + // boolean alpha = true; 1.39 + // We deviate from the spec here. 1.40 + // If alpha isn't specified, we rely on a pref ("webgl.default-no-alpha") 1.41 + boolean alpha; 1.42 + boolean depth = true; 1.43 + boolean stencil = false; 1.44 + boolean antialias = true; 1.45 + boolean premultipliedAlpha = true; 1.46 + boolean preserveDrawingBuffer = false; 1.47 +}; 1.48 + 1.49 +interface WebGLBuffer { 1.50 +}; 1.51 + 1.52 +interface WebGLFramebuffer { 1.53 +}; 1.54 + 1.55 +interface WebGLProgram { 1.56 +}; 1.57 + 1.58 +interface WebGLRenderbuffer { 1.59 +}; 1.60 + 1.61 +interface WebGLShader { 1.62 +}; 1.63 + 1.64 +interface WebGLTexture { 1.65 +}; 1.66 + 1.67 +interface WebGLUniformLocation { 1.68 +}; 1.69 + 1.70 +interface WebGLVertexArray { 1.71 +}; 1.72 + 1.73 +interface WebGLActiveInfo { 1.74 + readonly attribute GLint size; 1.75 + readonly attribute GLenum type; 1.76 + readonly attribute DOMString name; 1.77 +}; 1.78 + 1.79 +interface WebGLShaderPrecisionFormat { 1.80 + readonly attribute GLint rangeMin; 1.81 + readonly attribute GLint rangeMax; 1.82 + readonly attribute GLint precision; 1.83 +}; 1.84 + 1.85 +interface WebGLRenderingContext { 1.86 + 1.87 + /* ClearBufferMask */ 1.88 + const GLenum DEPTH_BUFFER_BIT = 0x00000100; 1.89 + const GLenum STENCIL_BUFFER_BIT = 0x00000400; 1.90 + const GLenum COLOR_BUFFER_BIT = 0x00004000; 1.91 + 1.92 + /* BeginMode */ 1.93 + const GLenum POINTS = 0x0000; 1.94 + const GLenum LINES = 0x0001; 1.95 + const GLenum LINE_LOOP = 0x0002; 1.96 + const GLenum LINE_STRIP = 0x0003; 1.97 + const GLenum TRIANGLES = 0x0004; 1.98 + const GLenum TRIANGLE_STRIP = 0x0005; 1.99 + const GLenum TRIANGLE_FAN = 0x0006; 1.100 + 1.101 + /* AlphaFunction (not supported in ES20) */ 1.102 + /* NEVER */ 1.103 + /* LESS */ 1.104 + /* EQUAL */ 1.105 + /* LEQUAL */ 1.106 + /* GREATER */ 1.107 + /* NOTEQUAL */ 1.108 + /* GEQUAL */ 1.109 + /* ALWAYS */ 1.110 + 1.111 + /* BlendingFactorDest */ 1.112 + const GLenum ZERO = 0; 1.113 + const GLenum ONE = 1; 1.114 + const GLenum SRC_COLOR = 0x0300; 1.115 + const GLenum ONE_MINUS_SRC_COLOR = 0x0301; 1.116 + const GLenum SRC_ALPHA = 0x0302; 1.117 + const GLenum ONE_MINUS_SRC_ALPHA = 0x0303; 1.118 + const GLenum DST_ALPHA = 0x0304; 1.119 + const GLenum ONE_MINUS_DST_ALPHA = 0x0305; 1.120 + 1.121 + /* BlendingFactorSrc */ 1.122 + /* ZERO */ 1.123 + /* ONE */ 1.124 + const GLenum DST_COLOR = 0x0306; 1.125 + const GLenum ONE_MINUS_DST_COLOR = 0x0307; 1.126 + const GLenum SRC_ALPHA_SATURATE = 0x0308; 1.127 + /* SRC_ALPHA */ 1.128 + /* ONE_MINUS_SRC_ALPHA */ 1.129 + /* DST_ALPHA */ 1.130 + /* ONE_MINUS_DST_ALPHA */ 1.131 + 1.132 + /* BlendEquationSeparate */ 1.133 + const GLenum FUNC_ADD = 0x8006; 1.134 + const GLenum BLEND_EQUATION = 0x8009; 1.135 + const GLenum BLEND_EQUATION_RGB = 0x8009; /* same as BLEND_EQUATION */ 1.136 + const GLenum BLEND_EQUATION_ALPHA = 0x883D; 1.137 + 1.138 + /* BlendSubtract */ 1.139 + const GLenum FUNC_SUBTRACT = 0x800A; 1.140 + const GLenum FUNC_REVERSE_SUBTRACT = 0x800B; 1.141 + 1.142 + /* Separate Blend Functions */ 1.143 + const GLenum BLEND_DST_RGB = 0x80C8; 1.144 + const GLenum BLEND_SRC_RGB = 0x80C9; 1.145 + const GLenum BLEND_DST_ALPHA = 0x80CA; 1.146 + const GLenum BLEND_SRC_ALPHA = 0x80CB; 1.147 + const GLenum CONSTANT_COLOR = 0x8001; 1.148 + const GLenum ONE_MINUS_CONSTANT_COLOR = 0x8002; 1.149 + const GLenum CONSTANT_ALPHA = 0x8003; 1.150 + const GLenum ONE_MINUS_CONSTANT_ALPHA = 0x8004; 1.151 + const GLenum BLEND_COLOR = 0x8005; 1.152 + 1.153 + /* Buffer Objects */ 1.154 + const GLenum ARRAY_BUFFER = 0x8892; 1.155 + const GLenum ELEMENT_ARRAY_BUFFER = 0x8893; 1.156 + const GLenum ARRAY_BUFFER_BINDING = 0x8894; 1.157 + const GLenum ELEMENT_ARRAY_BUFFER_BINDING = 0x8895; 1.158 + 1.159 + const GLenum STREAM_DRAW = 0x88E0; 1.160 + const GLenum STATIC_DRAW = 0x88E4; 1.161 + const GLenum DYNAMIC_DRAW = 0x88E8; 1.162 + 1.163 + const GLenum BUFFER_SIZE = 0x8764; 1.164 + const GLenum BUFFER_USAGE = 0x8765; 1.165 + 1.166 + const GLenum CURRENT_VERTEX_ATTRIB = 0x8626; 1.167 + 1.168 + /* CullFaceMode */ 1.169 + const GLenum FRONT = 0x0404; 1.170 + const GLenum BACK = 0x0405; 1.171 + const GLenum FRONT_AND_BACK = 0x0408; 1.172 + 1.173 + /* DepthFunction */ 1.174 + /* NEVER */ 1.175 + /* LESS */ 1.176 + /* EQUAL */ 1.177 + /* LEQUAL */ 1.178 + /* GREATER */ 1.179 + /* NOTEQUAL */ 1.180 + /* GEQUAL */ 1.181 + /* ALWAYS */ 1.182 + 1.183 + /* EnableCap */ 1.184 + /* TEXTURE_2D */ 1.185 + const GLenum CULL_FACE = 0x0B44; 1.186 + const GLenum BLEND = 0x0BE2; 1.187 + const GLenum DITHER = 0x0BD0; 1.188 + const GLenum STENCIL_TEST = 0x0B90; 1.189 + const GLenum DEPTH_TEST = 0x0B71; 1.190 + const GLenum SCISSOR_TEST = 0x0C11; 1.191 + const GLenum POLYGON_OFFSET_FILL = 0x8037; 1.192 + const GLenum SAMPLE_ALPHA_TO_COVERAGE = 0x809E; 1.193 + const GLenum SAMPLE_COVERAGE = 0x80A0; 1.194 + 1.195 + /* ErrorCode */ 1.196 + const GLenum NO_ERROR = 0; 1.197 + const GLenum INVALID_ENUM = 0x0500; 1.198 + const GLenum INVALID_VALUE = 0x0501; 1.199 + const GLenum INVALID_OPERATION = 0x0502; 1.200 + const GLenum OUT_OF_MEMORY = 0x0505; 1.201 + 1.202 + /* FrontFaceDirection */ 1.203 + const GLenum CW = 0x0900; 1.204 + const GLenum CCW = 0x0901; 1.205 + 1.206 + /* GetPName */ 1.207 + const GLenum LINE_WIDTH = 0x0B21; 1.208 + const GLenum ALIASED_POINT_SIZE_RANGE = 0x846D; 1.209 + const GLenum ALIASED_LINE_WIDTH_RANGE = 0x846E; 1.210 + const GLenum CULL_FACE_MODE = 0x0B45; 1.211 + const GLenum FRONT_FACE = 0x0B46; 1.212 + const GLenum DEPTH_RANGE = 0x0B70; 1.213 + const GLenum DEPTH_WRITEMASK = 0x0B72; 1.214 + const GLenum DEPTH_CLEAR_VALUE = 0x0B73; 1.215 + const GLenum DEPTH_FUNC = 0x0B74; 1.216 + const GLenum STENCIL_CLEAR_VALUE = 0x0B91; 1.217 + const GLenum STENCIL_FUNC = 0x0B92; 1.218 + const GLenum STENCIL_FAIL = 0x0B94; 1.219 + const GLenum STENCIL_PASS_DEPTH_FAIL = 0x0B95; 1.220 + const GLenum STENCIL_PASS_DEPTH_PASS = 0x0B96; 1.221 + const GLenum STENCIL_REF = 0x0B97; 1.222 + const GLenum STENCIL_VALUE_MASK = 0x0B93; 1.223 + const GLenum STENCIL_WRITEMASK = 0x0B98; 1.224 + const GLenum STENCIL_BACK_FUNC = 0x8800; 1.225 + const GLenum STENCIL_BACK_FAIL = 0x8801; 1.226 + const GLenum STENCIL_BACK_PASS_DEPTH_FAIL = 0x8802; 1.227 + const GLenum STENCIL_BACK_PASS_DEPTH_PASS = 0x8803; 1.228 + const GLenum STENCIL_BACK_REF = 0x8CA3; 1.229 + const GLenum STENCIL_BACK_VALUE_MASK = 0x8CA4; 1.230 + const GLenum STENCIL_BACK_WRITEMASK = 0x8CA5; 1.231 + const GLenum VIEWPORT = 0x0BA2; 1.232 + const GLenum SCISSOR_BOX = 0x0C10; 1.233 + /* SCISSOR_TEST */ 1.234 + const GLenum COLOR_CLEAR_VALUE = 0x0C22; 1.235 + const GLenum COLOR_WRITEMASK = 0x0C23; 1.236 + const GLenum UNPACK_ALIGNMENT = 0x0CF5; 1.237 + const GLenum PACK_ALIGNMENT = 0x0D05; 1.238 + const GLenum MAX_TEXTURE_SIZE = 0x0D33; 1.239 + const GLenum MAX_VIEWPORT_DIMS = 0x0D3A; 1.240 + const GLenum SUBPIXEL_BITS = 0x0D50; 1.241 + const GLenum RED_BITS = 0x0D52; 1.242 + const GLenum GREEN_BITS = 0x0D53; 1.243 + const GLenum BLUE_BITS = 0x0D54; 1.244 + const GLenum ALPHA_BITS = 0x0D55; 1.245 + const GLenum DEPTH_BITS = 0x0D56; 1.246 + const GLenum STENCIL_BITS = 0x0D57; 1.247 + const GLenum POLYGON_OFFSET_UNITS = 0x2A00; 1.248 + /* POLYGON_OFFSET_FILL */ 1.249 + const GLenum POLYGON_OFFSET_FACTOR = 0x8038; 1.250 + const GLenum TEXTURE_BINDING_2D = 0x8069; 1.251 + const GLenum SAMPLE_BUFFERS = 0x80A8; 1.252 + const GLenum SAMPLES = 0x80A9; 1.253 + const GLenum SAMPLE_COVERAGE_VALUE = 0x80AA; 1.254 + const GLenum SAMPLE_COVERAGE_INVERT = 0x80AB; 1.255 + 1.256 + /* GetTextureParameter */ 1.257 + /* TEXTURE_MAG_FILTER */ 1.258 + /* TEXTURE_MIN_FILTER */ 1.259 + /* TEXTURE_WRAP_S */ 1.260 + /* TEXTURE_WRAP_T */ 1.261 + 1.262 + const GLenum COMPRESSED_TEXTURE_FORMATS = 0x86A3; 1.263 + 1.264 + /* HintMode */ 1.265 + const GLenum DONT_CARE = 0x1100; 1.266 + const GLenum FASTEST = 0x1101; 1.267 + const GLenum NICEST = 0x1102; 1.268 + 1.269 + /* HintTarget */ 1.270 + const GLenum GENERATE_MIPMAP_HINT = 0x8192; 1.271 + 1.272 + /* DataType */ 1.273 + const GLenum BYTE = 0x1400; 1.274 + const GLenum UNSIGNED_BYTE = 0x1401; 1.275 + const GLenum SHORT = 0x1402; 1.276 + const GLenum UNSIGNED_SHORT = 0x1403; 1.277 + const GLenum INT = 0x1404; 1.278 + const GLenum UNSIGNED_INT = 0x1405; 1.279 + const GLenum FLOAT = 0x1406; 1.280 + 1.281 + /* PixelFormat */ 1.282 + const GLenum DEPTH_COMPONENT = 0x1902; 1.283 + const GLenum ALPHA = 0x1906; 1.284 + const GLenum RGB = 0x1907; 1.285 + const GLenum RGBA = 0x1908; 1.286 + const GLenum LUMINANCE = 0x1909; 1.287 + const GLenum LUMINANCE_ALPHA = 0x190A; 1.288 + 1.289 + /* PixelType */ 1.290 + /* UNSIGNED_BYTE */ 1.291 + const GLenum UNSIGNED_SHORT_4_4_4_4 = 0x8033; 1.292 + const GLenum UNSIGNED_SHORT_5_5_5_1 = 0x8034; 1.293 + const GLenum UNSIGNED_SHORT_5_6_5 = 0x8363; 1.294 + 1.295 + /* Shaders */ 1.296 + const GLenum FRAGMENT_SHADER = 0x8B30; 1.297 + const GLenum VERTEX_SHADER = 0x8B31; 1.298 + const GLenum MAX_VERTEX_ATTRIBS = 0x8869; 1.299 + const GLenum MAX_VERTEX_UNIFORM_VECTORS = 0x8DFB; 1.300 + const GLenum MAX_VARYING_VECTORS = 0x8DFC; 1.301 + const GLenum MAX_COMBINED_TEXTURE_IMAGE_UNITS = 0x8B4D; 1.302 + const GLenum MAX_VERTEX_TEXTURE_IMAGE_UNITS = 0x8B4C; 1.303 + const GLenum MAX_TEXTURE_IMAGE_UNITS = 0x8872; 1.304 + const GLenum MAX_FRAGMENT_UNIFORM_VECTORS = 0x8DFD; 1.305 + const GLenum SHADER_TYPE = 0x8B4F; 1.306 + const GLenum DELETE_STATUS = 0x8B80; 1.307 + const GLenum LINK_STATUS = 0x8B82; 1.308 + const GLenum VALIDATE_STATUS = 0x8B83; 1.309 + const GLenum ATTACHED_SHADERS = 0x8B85; 1.310 + const GLenum ACTIVE_UNIFORMS = 0x8B86; 1.311 + const GLenum ACTIVE_ATTRIBUTES = 0x8B89; 1.312 + const GLenum SHADING_LANGUAGE_VERSION = 0x8B8C; 1.313 + const GLenum CURRENT_PROGRAM = 0x8B8D; 1.314 + 1.315 + /* StencilFunction */ 1.316 + const GLenum NEVER = 0x0200; 1.317 + const GLenum LESS = 0x0201; 1.318 + const GLenum EQUAL = 0x0202; 1.319 + const GLenum LEQUAL = 0x0203; 1.320 + const GLenum GREATER = 0x0204; 1.321 + const GLenum NOTEQUAL = 0x0205; 1.322 + const GLenum GEQUAL = 0x0206; 1.323 + const GLenum ALWAYS = 0x0207; 1.324 + 1.325 + /* StencilOp */ 1.326 + /* ZERO */ 1.327 + const GLenum KEEP = 0x1E00; 1.328 + const GLenum REPLACE = 0x1E01; 1.329 + const GLenum INCR = 0x1E02; 1.330 + const GLenum DECR = 0x1E03; 1.331 + const GLenum INVERT = 0x150A; 1.332 + const GLenum INCR_WRAP = 0x8507; 1.333 + const GLenum DECR_WRAP = 0x8508; 1.334 + 1.335 + /* StringName */ 1.336 + const GLenum VENDOR = 0x1F00; 1.337 + const GLenum RENDERER = 0x1F01; 1.338 + const GLenum VERSION = 0x1F02; 1.339 + 1.340 + /* TextureMagFilter */ 1.341 + const GLenum NEAREST = 0x2600; 1.342 + const GLenum LINEAR = 0x2601; 1.343 + 1.344 + /* TextureMinFilter */ 1.345 + /* NEAREST */ 1.346 + /* LINEAR */ 1.347 + const GLenum NEAREST_MIPMAP_NEAREST = 0x2700; 1.348 + const GLenum LINEAR_MIPMAP_NEAREST = 0x2701; 1.349 + const GLenum NEAREST_MIPMAP_LINEAR = 0x2702; 1.350 + const GLenum LINEAR_MIPMAP_LINEAR = 0x2703; 1.351 + 1.352 + /* TextureParameterName */ 1.353 + const GLenum TEXTURE_MAG_FILTER = 0x2800; 1.354 + const GLenum TEXTURE_MIN_FILTER = 0x2801; 1.355 + const GLenum TEXTURE_WRAP_S = 0x2802; 1.356 + const GLenum TEXTURE_WRAP_T = 0x2803; 1.357 + 1.358 + /* TextureTarget */ 1.359 + const GLenum TEXTURE_2D = 0x0DE1; 1.360 + const GLenum TEXTURE = 0x1702; 1.361 + 1.362 + const GLenum TEXTURE_CUBE_MAP = 0x8513; 1.363 + const GLenum TEXTURE_BINDING_CUBE_MAP = 0x8514; 1.364 + const GLenum TEXTURE_CUBE_MAP_POSITIVE_X = 0x8515; 1.365 + const GLenum TEXTURE_CUBE_MAP_NEGATIVE_X = 0x8516; 1.366 + const GLenum TEXTURE_CUBE_MAP_POSITIVE_Y = 0x8517; 1.367 + const GLenum TEXTURE_CUBE_MAP_NEGATIVE_Y = 0x8518; 1.368 + const GLenum TEXTURE_CUBE_MAP_POSITIVE_Z = 0x8519; 1.369 + const GLenum TEXTURE_CUBE_MAP_NEGATIVE_Z = 0x851A; 1.370 + const GLenum MAX_CUBE_MAP_TEXTURE_SIZE = 0x851C; 1.371 + 1.372 + /* TextureUnit */ 1.373 + const GLenum TEXTURE0 = 0x84C0; 1.374 + const GLenum TEXTURE1 = 0x84C1; 1.375 + const GLenum TEXTURE2 = 0x84C2; 1.376 + const GLenum TEXTURE3 = 0x84C3; 1.377 + const GLenum TEXTURE4 = 0x84C4; 1.378 + const GLenum TEXTURE5 = 0x84C5; 1.379 + const GLenum TEXTURE6 = 0x84C6; 1.380 + const GLenum TEXTURE7 = 0x84C7; 1.381 + const GLenum TEXTURE8 = 0x84C8; 1.382 + const GLenum TEXTURE9 = 0x84C9; 1.383 + const GLenum TEXTURE10 = 0x84CA; 1.384 + const GLenum TEXTURE11 = 0x84CB; 1.385 + const GLenum TEXTURE12 = 0x84CC; 1.386 + const GLenum TEXTURE13 = 0x84CD; 1.387 + const GLenum TEXTURE14 = 0x84CE; 1.388 + const GLenum TEXTURE15 = 0x84CF; 1.389 + const GLenum TEXTURE16 = 0x84D0; 1.390 + const GLenum TEXTURE17 = 0x84D1; 1.391 + const GLenum TEXTURE18 = 0x84D2; 1.392 + const GLenum TEXTURE19 = 0x84D3; 1.393 + const GLenum TEXTURE20 = 0x84D4; 1.394 + const GLenum TEXTURE21 = 0x84D5; 1.395 + const GLenum TEXTURE22 = 0x84D6; 1.396 + const GLenum TEXTURE23 = 0x84D7; 1.397 + const GLenum TEXTURE24 = 0x84D8; 1.398 + const GLenum TEXTURE25 = 0x84D9; 1.399 + const GLenum TEXTURE26 = 0x84DA; 1.400 + const GLenum TEXTURE27 = 0x84DB; 1.401 + const GLenum TEXTURE28 = 0x84DC; 1.402 + const GLenum TEXTURE29 = 0x84DD; 1.403 + const GLenum TEXTURE30 = 0x84DE; 1.404 + const GLenum TEXTURE31 = 0x84DF; 1.405 + const GLenum ACTIVE_TEXTURE = 0x84E0; 1.406 + 1.407 + /* TextureWrapMode */ 1.408 + const GLenum REPEAT = 0x2901; 1.409 + const GLenum CLAMP_TO_EDGE = 0x812F; 1.410 + const GLenum MIRRORED_REPEAT = 0x8370; 1.411 + 1.412 + /* Uniform Types */ 1.413 + const GLenum FLOAT_VEC2 = 0x8B50; 1.414 + const GLenum FLOAT_VEC3 = 0x8B51; 1.415 + const GLenum FLOAT_VEC4 = 0x8B52; 1.416 + const GLenum INT_VEC2 = 0x8B53; 1.417 + const GLenum INT_VEC3 = 0x8B54; 1.418 + const GLenum INT_VEC4 = 0x8B55; 1.419 + const GLenum BOOL = 0x8B56; 1.420 + const GLenum BOOL_VEC2 = 0x8B57; 1.421 + const GLenum BOOL_VEC3 = 0x8B58; 1.422 + const GLenum BOOL_VEC4 = 0x8B59; 1.423 + const GLenum FLOAT_MAT2 = 0x8B5A; 1.424 + const GLenum FLOAT_MAT3 = 0x8B5B; 1.425 + const GLenum FLOAT_MAT4 = 0x8B5C; 1.426 + const GLenum SAMPLER_2D = 0x8B5E; 1.427 + const GLenum SAMPLER_CUBE = 0x8B60; 1.428 + 1.429 + /* Vertex Arrays */ 1.430 + const GLenum VERTEX_ATTRIB_ARRAY_ENABLED = 0x8622; 1.431 + const GLenum VERTEX_ATTRIB_ARRAY_SIZE = 0x8623; 1.432 + const GLenum VERTEX_ATTRIB_ARRAY_STRIDE = 0x8624; 1.433 + const GLenum VERTEX_ATTRIB_ARRAY_TYPE = 0x8625; 1.434 + const GLenum VERTEX_ATTRIB_ARRAY_NORMALIZED = 0x886A; 1.435 + const GLenum VERTEX_ATTRIB_ARRAY_POINTER = 0x8645; 1.436 + const GLenum VERTEX_ATTRIB_ARRAY_BUFFER_BINDING = 0x889F; 1.437 + 1.438 + /* Shader Source */ 1.439 + const GLenum COMPILE_STATUS = 0x8B81; 1.440 + 1.441 + /* Shader Precision-Specified Types */ 1.442 + const GLenum LOW_FLOAT = 0x8DF0; 1.443 + const GLenum MEDIUM_FLOAT = 0x8DF1; 1.444 + const GLenum HIGH_FLOAT = 0x8DF2; 1.445 + const GLenum LOW_INT = 0x8DF3; 1.446 + const GLenum MEDIUM_INT = 0x8DF4; 1.447 + const GLenum HIGH_INT = 0x8DF5; 1.448 + 1.449 + /* Framebuffer Object. */ 1.450 + const GLenum FRAMEBUFFER = 0x8D40; 1.451 + const GLenum RENDERBUFFER = 0x8D41; 1.452 + 1.453 + const GLenum RGBA4 = 0x8056; 1.454 + const GLenum RGB5_A1 = 0x8057; 1.455 + const GLenum RGB565 = 0x8D62; 1.456 + const GLenum DEPTH_COMPONENT16 = 0x81A5; 1.457 + const GLenum STENCIL_INDEX = 0x1901; 1.458 + const GLenum STENCIL_INDEX8 = 0x8D48; 1.459 + const GLenum DEPTH_STENCIL = 0x84F9; 1.460 + 1.461 + const GLenum RENDERBUFFER_WIDTH = 0x8D42; 1.462 + const GLenum RENDERBUFFER_HEIGHT = 0x8D43; 1.463 + const GLenum RENDERBUFFER_INTERNAL_FORMAT = 0x8D44; 1.464 + const GLenum RENDERBUFFER_RED_SIZE = 0x8D50; 1.465 + const GLenum RENDERBUFFER_GREEN_SIZE = 0x8D51; 1.466 + const GLenum RENDERBUFFER_BLUE_SIZE = 0x8D52; 1.467 + const GLenum RENDERBUFFER_ALPHA_SIZE = 0x8D53; 1.468 + const GLenum RENDERBUFFER_DEPTH_SIZE = 0x8D54; 1.469 + const GLenum RENDERBUFFER_STENCIL_SIZE = 0x8D55; 1.470 + 1.471 + const GLenum FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE = 0x8CD0; 1.472 + const GLenum FRAMEBUFFER_ATTACHMENT_OBJECT_NAME = 0x8CD1; 1.473 + const GLenum FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL = 0x8CD2; 1.474 + const GLenum FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE = 0x8CD3; 1.475 + 1.476 + const GLenum COLOR_ATTACHMENT0 = 0x8CE0; 1.477 + const GLenum DEPTH_ATTACHMENT = 0x8D00; 1.478 + const GLenum STENCIL_ATTACHMENT = 0x8D20; 1.479 + const GLenum DEPTH_STENCIL_ATTACHMENT = 0x821A; 1.480 + 1.481 + const GLenum NONE = 0; 1.482 + 1.483 + const GLenum FRAMEBUFFER_COMPLETE = 0x8CD5; 1.484 + const GLenum FRAMEBUFFER_INCOMPLETE_ATTACHMENT = 0x8CD6; 1.485 + const GLenum FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT = 0x8CD7; 1.486 + const GLenum FRAMEBUFFER_INCOMPLETE_DIMENSIONS = 0x8CD9; 1.487 + const GLenum FRAMEBUFFER_UNSUPPORTED = 0x8CDD; 1.488 + 1.489 + const GLenum FRAMEBUFFER_BINDING = 0x8CA6; 1.490 + const GLenum RENDERBUFFER_BINDING = 0x8CA7; 1.491 + const GLenum MAX_RENDERBUFFER_SIZE = 0x84E8; 1.492 + 1.493 + const GLenum INVALID_FRAMEBUFFER_OPERATION = 0x0506; 1.494 + 1.495 + /* WebGL-specific enums */ 1.496 + const GLenum UNPACK_FLIP_Y_WEBGL = 0x9240; 1.497 + const GLenum UNPACK_PREMULTIPLY_ALPHA_WEBGL = 0x9241; 1.498 + const GLenum CONTEXT_LOST_WEBGL = 0x9242; 1.499 + const GLenum UNPACK_COLORSPACE_CONVERSION_WEBGL = 0x9243; 1.500 + const GLenum BROWSER_DEFAULT_WEBGL = 0x9244; 1.501 + 1.502 + // The canvas might actually be null in some cases, apparently. 1.503 + readonly attribute HTMLCanvasElement? canvas; 1.504 + readonly attribute GLsizei drawingBufferWidth; 1.505 + readonly attribute GLsizei drawingBufferHeight; 1.506 + 1.507 + [WebGLHandlesContextLoss] WebGLContextAttributes? getContextAttributes(); 1.508 + [WebGLHandlesContextLoss] boolean isContextLost(); 1.509 + 1.510 + sequence<DOMString>? getSupportedExtensions(); 1.511 + 1.512 + [Throws] 1.513 + object? getExtension(DOMString name); 1.514 + 1.515 + void activeTexture(GLenum texture); 1.516 + void attachShader(WebGLProgram? program, WebGLShader? shader); 1.517 + void bindAttribLocation(WebGLProgram? program, GLuint index, DOMString name); 1.518 + void bindBuffer(GLenum target, WebGLBuffer? buffer); 1.519 + void bindFramebuffer(GLenum target, WebGLFramebuffer? framebuffer); 1.520 + void bindRenderbuffer(GLenum target, WebGLRenderbuffer? renderbuffer); 1.521 + void bindTexture(GLenum target, WebGLTexture? texture); 1.522 + void blendColor(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha); 1.523 + void blendEquation(GLenum mode); 1.524 + void blendEquationSeparate(GLenum modeRGB, GLenum modeAlpha); 1.525 + void blendFunc(GLenum sfactor, GLenum dfactor); 1.526 + void blendFuncSeparate(GLenum srcRGB, GLenum dstRGB, 1.527 + GLenum srcAlpha, GLenum dstAlpha); 1.528 + 1.529 + void bufferData(GLenum target, GLsizeiptr size, GLenum usage); 1.530 + void bufferData(GLenum target, ArrayBufferView data, GLenum usage); 1.531 + void bufferData(GLenum target, ArrayBuffer? data, GLenum usage); 1.532 + void bufferSubData(GLenum target, GLintptr offset, ArrayBufferView data); 1.533 + void bufferSubData(GLenum target, GLintptr offset, ArrayBuffer? data); 1.534 + 1.535 + [WebGLHandlesContextLoss] GLenum checkFramebufferStatus(GLenum target); 1.536 + void clear(GLbitfield mask); 1.537 + void clearColor(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha); 1.538 + void clearDepth(GLclampf depth); 1.539 + void clearStencil(GLint s); 1.540 + void colorMask(GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha); 1.541 + void compileShader(WebGLShader? shader); 1.542 + 1.543 + void compressedTexImage2D(GLenum target, GLint level, GLenum internalformat, 1.544 + GLsizei width, GLsizei height, GLint border, 1.545 + ArrayBufferView data); 1.546 + void compressedTexSubImage2D(GLenum target, GLint level, 1.547 + GLint xoffset, GLint yoffset, 1.548 + GLsizei width, GLsizei height, GLenum format, 1.549 + ArrayBufferView data); 1.550 + 1.551 + void copyTexImage2D(GLenum target, GLint level, GLenum internalformat, 1.552 + GLint x, GLint y, GLsizei width, GLsizei height, 1.553 + GLint border); 1.554 + void copyTexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, 1.555 + GLint x, GLint y, GLsizei width, GLsizei height); 1.556 + 1.557 + WebGLBuffer? createBuffer(); 1.558 + WebGLFramebuffer? createFramebuffer(); 1.559 + WebGLProgram? createProgram(); 1.560 + WebGLRenderbuffer? createRenderbuffer(); 1.561 + WebGLShader? createShader(GLenum type); 1.562 + WebGLTexture? createTexture(); 1.563 + 1.564 + void cullFace(GLenum mode); 1.565 + 1.566 + void deleteBuffer(WebGLBuffer? buffer); 1.567 + void deleteFramebuffer(WebGLFramebuffer? framebuffer); 1.568 + void deleteProgram(WebGLProgram? program); 1.569 + void deleteRenderbuffer(WebGLRenderbuffer? renderbuffer); 1.570 + void deleteShader(WebGLShader? shader); 1.571 + void deleteTexture(WebGLTexture? texture); 1.572 + 1.573 + void depthFunc(GLenum func); 1.574 + void depthMask(GLboolean flag); 1.575 + void depthRange(GLclampf zNear, GLclampf zFar); 1.576 + void detachShader(WebGLProgram? program, WebGLShader? shader); 1.577 + void disable(GLenum cap); 1.578 + void disableVertexAttribArray(GLuint index); 1.579 + void drawArrays(GLenum mode, GLint first, GLsizei count); 1.580 + void drawElements(GLenum mode, GLsizei count, GLenum type, GLintptr offset); 1.581 + 1.582 + void enable(GLenum cap); 1.583 + void enableVertexAttribArray(GLuint index); 1.584 + void finish(); 1.585 + void flush(); 1.586 + void framebufferRenderbuffer(GLenum target, GLenum attachment, 1.587 + GLenum renderbuffertarget, 1.588 + WebGLRenderbuffer? renderbuffer); 1.589 + void framebufferTexture2D(GLenum target, GLenum attachment, GLenum textarget, 1.590 + WebGLTexture? texture, GLint level); 1.591 + void frontFace(GLenum mode); 1.592 + 1.593 + void generateMipmap(GLenum target); 1.594 + 1.595 + [NewObject] 1.596 + WebGLActiveInfo? getActiveAttrib(WebGLProgram? program, GLuint index); 1.597 + [NewObject] 1.598 + WebGLActiveInfo? getActiveUniform(WebGLProgram? program, GLuint index); 1.599 + 1.600 + sequence<WebGLShader>? getAttachedShaders(WebGLProgram? program); 1.601 + 1.602 + [WebGLHandlesContextLoss] GLint getAttribLocation(WebGLProgram? program, DOMString name); 1.603 + 1.604 + any getBufferParameter(GLenum target, GLenum pname); 1.605 + [Throws] 1.606 + any getParameter(GLenum pname); 1.607 + 1.608 + [WebGLHandlesContextLoss] GLenum getError(); 1.609 + 1.610 + [Throws] 1.611 + any getFramebufferAttachmentParameter(GLenum target, GLenum attachment, 1.612 + GLenum pname); 1.613 + any getProgramParameter(WebGLProgram? program, GLenum pname); 1.614 + DOMString? getProgramInfoLog(WebGLProgram? program); 1.615 + any getRenderbufferParameter(GLenum target, GLenum pname); 1.616 + any getShaderParameter(WebGLShader? shader, GLenum pname); 1.617 + 1.618 + [NewObject] 1.619 + WebGLShaderPrecisionFormat? getShaderPrecisionFormat(GLenum shadertype, GLenum precisiontype); 1.620 + 1.621 + DOMString? getShaderInfoLog(WebGLShader? shader); 1.622 + 1.623 + DOMString? getShaderSource(WebGLShader? shader); 1.624 + 1.625 + any getTexParameter(GLenum target, GLenum pname); 1.626 + 1.627 + any getUniform(WebGLProgram? program, WebGLUniformLocation? location); 1.628 + 1.629 + [NewObject] 1.630 + WebGLUniformLocation? getUniformLocation(WebGLProgram? program, DOMString name); 1.631 + 1.632 + [Throws] 1.633 + any getVertexAttrib(GLuint index, GLenum pname); 1.634 + 1.635 + [WebGLHandlesContextLoss] GLsizeiptr getVertexAttribOffset(GLuint index, GLenum pname); 1.636 + 1.637 + void hint(GLenum target, GLenum mode); 1.638 + [WebGLHandlesContextLoss] GLboolean isBuffer(WebGLBuffer? buffer); 1.639 + [WebGLHandlesContextLoss] GLboolean isEnabled(GLenum cap); 1.640 + [WebGLHandlesContextLoss] GLboolean isFramebuffer(WebGLFramebuffer? framebuffer); 1.641 + [WebGLHandlesContextLoss] GLboolean isProgram(WebGLProgram? program); 1.642 + [WebGLHandlesContextLoss] GLboolean isRenderbuffer(WebGLRenderbuffer? renderbuffer); 1.643 + [WebGLHandlesContextLoss] GLboolean isShader(WebGLShader? shader); 1.644 + [WebGLHandlesContextLoss] GLboolean isTexture(WebGLTexture? texture); 1.645 + void lineWidth(GLfloat width); 1.646 + void linkProgram(WebGLProgram? program); 1.647 + void pixelStorei(GLenum pname, GLint param); 1.648 + void polygonOffset(GLfloat factor, GLfloat units); 1.649 + 1.650 + [Throws] 1.651 + void readPixels(GLint x, GLint y, GLsizei width, GLsizei height, 1.652 + GLenum format, GLenum type, ArrayBufferView? pixels); 1.653 + 1.654 + void renderbufferStorage(GLenum target, GLenum internalformat, 1.655 + GLsizei width, GLsizei height); 1.656 + void sampleCoverage(GLclampf value, GLboolean invert); 1.657 + void scissor(GLint x, GLint y, GLsizei width, GLsizei height); 1.658 + 1.659 + void shaderSource(WebGLShader? shader, DOMString source); 1.660 + 1.661 + void stencilFunc(GLenum func, GLint ref, GLuint mask); 1.662 + void stencilFuncSeparate(GLenum face, GLenum func, GLint ref, GLuint mask); 1.663 + void stencilMask(GLuint mask); 1.664 + void stencilMaskSeparate(GLenum face, GLuint mask); 1.665 + void stencilOp(GLenum fail, GLenum zfail, GLenum zpass); 1.666 + void stencilOpSeparate(GLenum face, GLenum fail, GLenum zfail, GLenum zpass); 1.667 + 1.668 + 1.669 + [Throws] 1.670 + void texImage2D(GLenum target, GLint level, GLenum internalformat, 1.671 + GLsizei width, GLsizei height, GLint border, GLenum format, 1.672 + GLenum type, ArrayBufferView? pixels); 1.673 + [Throws] 1.674 + void texImage2D(GLenum target, GLint level, GLenum internalformat, 1.675 + GLenum format, GLenum type, ImageData? pixels); 1.676 + [Throws] 1.677 + void texImage2D(GLenum target, GLint level, GLenum internalformat, 1.678 + GLenum format, GLenum type, HTMLImageElement image); // May throw DOMException 1.679 + [Throws] 1.680 + void texImage2D(GLenum target, GLint level, GLenum internalformat, 1.681 + GLenum format, GLenum type, HTMLCanvasElement canvas); // May throw DOMException 1.682 + [Throws] 1.683 + void texImage2D(GLenum target, GLint level, GLenum internalformat, 1.684 + GLenum format, GLenum type, HTMLVideoElement video); // May throw DOMException 1.685 + 1.686 + void texParameterf(GLenum target, GLenum pname, GLfloat param); 1.687 + void texParameteri(GLenum target, GLenum pname, GLint param); 1.688 + 1.689 + [Throws] 1.690 + void texSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, 1.691 + GLsizei width, GLsizei height, 1.692 + GLenum format, GLenum type, ArrayBufferView? pixels); 1.693 + [Throws] 1.694 + void texSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, 1.695 + GLenum format, GLenum type, ImageData? pixels); 1.696 + [Throws] 1.697 + void texSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, 1.698 + GLenum format, GLenum type, HTMLImageElement image); // May throw DOMException 1.699 + [Throws] 1.700 + void texSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, 1.701 + GLenum format, GLenum type, HTMLCanvasElement canvas); // May throw DOMException 1.702 + [Throws] 1.703 + void texSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, 1.704 + GLenum format, GLenum type, HTMLVideoElement video); // May throw DOMException 1.705 + 1.706 + void uniform1f(WebGLUniformLocation? location, GLfloat x); 1.707 + void uniform1fv(WebGLUniformLocation? location, Float32Array v); 1.708 + void uniform1fv(WebGLUniformLocation? location, sequence<GLfloat> v); 1.709 + void uniform1i(WebGLUniformLocation? location, GLint x); 1.710 + void uniform1iv(WebGLUniformLocation? location, Int32Array v); 1.711 + void uniform1iv(WebGLUniformLocation? location, sequence<long> v); 1.712 + void uniform2f(WebGLUniformLocation? location, GLfloat x, GLfloat y); 1.713 + void uniform2fv(WebGLUniformLocation? location, Float32Array v); 1.714 + void uniform2fv(WebGLUniformLocation? location, sequence<GLfloat> v); 1.715 + void uniform2i(WebGLUniformLocation? location, GLint x, GLint y); 1.716 + void uniform2iv(WebGLUniformLocation? location, Int32Array v); 1.717 + void uniform2iv(WebGLUniformLocation? location, sequence<long> v); 1.718 + void uniform3f(WebGLUniformLocation? location, GLfloat x, GLfloat y, GLfloat z); 1.719 + void uniform3fv(WebGLUniformLocation? location, Float32Array v); 1.720 + void uniform3fv(WebGLUniformLocation? location, sequence<GLfloat> v); 1.721 + void uniform3i(WebGLUniformLocation? location, GLint x, GLint y, GLint z); 1.722 + void uniform3iv(WebGLUniformLocation? location, Int32Array v); 1.723 + void uniform3iv(WebGLUniformLocation? location, sequence<long> v); 1.724 + void uniform4f(WebGLUniformLocation? location, GLfloat x, GLfloat y, GLfloat z, GLfloat w); 1.725 + void uniform4fv(WebGLUniformLocation? location, Float32Array v); 1.726 + void uniform4fv(WebGLUniformLocation? location, sequence<GLfloat> v); 1.727 + void uniform4i(WebGLUniformLocation? location, GLint x, GLint y, GLint z, GLint w); 1.728 + void uniform4iv(WebGLUniformLocation? location, Int32Array v); 1.729 + void uniform4iv(WebGLUniformLocation? location, sequence<long> v); 1.730 + 1.731 + void uniformMatrix2fv(WebGLUniformLocation? location, GLboolean transpose, 1.732 + Float32Array value); 1.733 + void uniformMatrix2fv(WebGLUniformLocation? location, GLboolean transpose, 1.734 + sequence<GLfloat> value); 1.735 + void uniformMatrix3fv(WebGLUniformLocation? location, GLboolean transpose, 1.736 + Float32Array value); 1.737 + void uniformMatrix3fv(WebGLUniformLocation? location, GLboolean transpose, 1.738 + sequence<GLfloat> value); 1.739 + void uniformMatrix4fv(WebGLUniformLocation? location, GLboolean transpose, 1.740 + Float32Array value); 1.741 + void uniformMatrix4fv(WebGLUniformLocation? location, GLboolean transpose, 1.742 + sequence<GLfloat> value); 1.743 + 1.744 + void useProgram(WebGLProgram? program); 1.745 + void validateProgram(WebGLProgram? program); 1.746 + 1.747 + void vertexAttrib1f(GLuint indx, GLfloat x); 1.748 + void vertexAttrib1fv(GLuint indx, Float32Array values); 1.749 + void vertexAttrib1fv(GLuint indx, sequence<GLfloat> values); 1.750 + void vertexAttrib2f(GLuint indx, GLfloat x, GLfloat y); 1.751 + void vertexAttrib2fv(GLuint indx, Float32Array values); 1.752 + void vertexAttrib2fv(GLuint indx, sequence<GLfloat> values); 1.753 + void vertexAttrib3f(GLuint indx, GLfloat x, GLfloat y, GLfloat z); 1.754 + void vertexAttrib3fv(GLuint indx, Float32Array values); 1.755 + void vertexAttrib3fv(GLuint indx, sequence<GLfloat> values); 1.756 + void vertexAttrib4f(GLuint indx, GLfloat x, GLfloat y, GLfloat z, GLfloat w); 1.757 + void vertexAttrib4fv(GLuint indx, Float32Array values); 1.758 + void vertexAttrib4fv(GLuint indx, sequence<GLfloat> values); 1.759 + void vertexAttribPointer(GLuint indx, GLint size, GLenum type, 1.760 + GLboolean normalized, GLsizei stride, GLintptr offset); 1.761 + 1.762 + void viewport(GLint x, GLint y, GLsizei width, GLsizei height); 1.763 +}; 1.764 + 1.765 +/*[Constructor(DOMString type, optional WebGLContextEventInit eventInit)] 1.766 +interface WebGLContextEvent : Event { 1.767 + readonly attribute DOMString statusMessage; 1.768 + };*/ 1.769 + 1.770 +// EventInit is defined in the DOM4 specification. 1.771 +/*dictionary WebGLContextEventInit : EventInit { 1.772 + DOMString statusMessage; 1.773 + };*/ 1.774 + 1.775 + 1.776 +// specific extension interfaces 1.777 + 1.778 +[NoInterfaceObject] 1.779 +interface WebGLExtensionCompressedTextureS3TC 1.780 +{ 1.781 + const GLenum COMPRESSED_RGB_S3TC_DXT1_EXT = 0x83F0; 1.782 + const GLenum COMPRESSED_RGBA_S3TC_DXT1_EXT = 0x83F1; 1.783 + const GLenum COMPRESSED_RGBA_S3TC_DXT3_EXT = 0x83F2; 1.784 + const GLenum COMPRESSED_RGBA_S3TC_DXT5_EXT = 0x83F3; 1.785 +}; 1.786 + 1.787 +[NoInterfaceObject] 1.788 +interface WebGLExtensionCompressedTextureATC 1.789 +{ 1.790 + const GLenum COMPRESSED_RGB_ATC_WEBGL = 0x8C92; 1.791 + const GLenum COMPRESSED_RGBA_ATC_EXPLICIT_ALPHA_WEBGL = 0x8C93; 1.792 + const GLenum COMPRESSED_RGBA_ATC_INTERPOLATED_ALPHA_WEBGL = 0x87EE; 1.793 +}; 1.794 + 1.795 +[NoInterfaceObject] 1.796 +interface WebGLExtensionCompressedTextureETC1 1.797 +{ 1.798 + const GLenum COMPRESSED_RGB_ETC1_WEBGL = 0x8D64; 1.799 +}; 1.800 + 1.801 +[NoInterfaceObject] 1.802 +interface WebGLExtensionCompressedTexturePVRTC 1.803 +{ 1.804 + const GLenum COMPRESSED_RGB_PVRTC_4BPPV1 = 0x8C00; 1.805 + const GLenum COMPRESSED_RGB_PVRTC_2BPPV1 = 0x8C01; 1.806 + const GLenum COMPRESSED_RGBA_PVRTC_4BPPV1 = 0x8C02; 1.807 + const GLenum COMPRESSED_RGBA_PVRTC_2BPPV1 = 0x8C03; 1.808 +}; 1.809 + 1.810 +[NoInterfaceObject] 1.811 +interface WebGLExtensionDebugRendererInfo 1.812 +{ 1.813 + const GLenum UNMASKED_VENDOR_WEBGL = 0x9245; 1.814 + const GLenum UNMASKED_RENDERER_WEBGL = 0x9246; 1.815 +}; 1.816 + 1.817 +[NoInterfaceObject] 1.818 +interface WebGLExtensionDebugShaders 1.819 +{ 1.820 + DOMString getTranslatedShaderSource(WebGLShader? shader); 1.821 +}; 1.822 + 1.823 +[NoInterfaceObject] 1.824 +interface WebGLExtensionDepthTexture 1.825 +{ 1.826 + const GLenum UNSIGNED_INT_24_8_WEBGL = 0x84FA; 1.827 +}; 1.828 + 1.829 +[NoInterfaceObject] 1.830 +interface WebGLExtensionElementIndexUint 1.831 +{ 1.832 +}; 1.833 + 1.834 +[NoInterfaceObject] 1.835 +interface WebGLExtensionFragDepth 1.836 +{ 1.837 +}; 1.838 + 1.839 +[NoInterfaceObject] 1.840 +interface WebGLExtensionLoseContext { 1.841 + void loseContext(); 1.842 + void restoreContext(); 1.843 +}; 1.844 + 1.845 +[NoInterfaceObject] 1.846 +interface WebGLExtensionTextureFilterAnisotropic 1.847 +{ 1.848 + const GLenum TEXTURE_MAX_ANISOTROPY_EXT = 0x84FE; 1.849 + const GLenum MAX_TEXTURE_MAX_ANISOTROPY_EXT = 0x84FF; 1.850 +}; 1.851 + 1.852 +[NoInterfaceObject] 1.853 +interface WebGLExtensionSRGB 1.854 +{ 1.855 + const GLenum SRGB_EXT = 0x8C40; 1.856 + const GLenum SRGB_ALPHA_EXT = 0x8C42; 1.857 + const GLenum SRGB8_ALPHA8_EXT = 0x8C43; 1.858 + const GLenum FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING_EXT = 0x8210; 1.859 +}; 1.860 + 1.861 +[NoInterfaceObject] 1.862 +interface WebGLExtensionStandardDerivatives { 1.863 + const GLenum FRAGMENT_SHADER_DERIVATIVE_HINT_OES = 0x8B8B; 1.864 +}; 1.865 + 1.866 +[NoInterfaceObject] 1.867 +interface WebGLExtensionTextureFloat 1.868 +{ 1.869 +}; 1.870 + 1.871 +[NoInterfaceObject] 1.872 +interface WebGLExtensionDrawBuffers { 1.873 + const GLenum COLOR_ATTACHMENT0_WEBGL = 0x8CE0; 1.874 + const GLenum COLOR_ATTACHMENT1_WEBGL = 0x8CE1; 1.875 + const GLenum COLOR_ATTACHMENT2_WEBGL = 0x8CE2; 1.876 + const GLenum COLOR_ATTACHMENT3_WEBGL = 0x8CE3; 1.877 + const GLenum COLOR_ATTACHMENT4_WEBGL = 0x8CE4; 1.878 + const GLenum COLOR_ATTACHMENT5_WEBGL = 0x8CE5; 1.879 + const GLenum COLOR_ATTACHMENT6_WEBGL = 0x8CE6; 1.880 + const GLenum COLOR_ATTACHMENT7_WEBGL = 0x8CE7; 1.881 + const GLenum COLOR_ATTACHMENT8_WEBGL = 0x8CE8; 1.882 + const GLenum COLOR_ATTACHMENT9_WEBGL = 0x8CE9; 1.883 + const GLenum COLOR_ATTACHMENT10_WEBGL = 0x8CEA; 1.884 + const GLenum COLOR_ATTACHMENT11_WEBGL = 0x8CEB; 1.885 + const GLenum COLOR_ATTACHMENT12_WEBGL = 0x8CEC; 1.886 + const GLenum COLOR_ATTACHMENT13_WEBGL = 0x8CED; 1.887 + const GLenum COLOR_ATTACHMENT14_WEBGL = 0x8CEE; 1.888 + const GLenum COLOR_ATTACHMENT15_WEBGL = 0x8CEF; 1.889 + 1.890 + const GLenum DRAW_BUFFER0_WEBGL = 0x8825; 1.891 + const GLenum DRAW_BUFFER1_WEBGL = 0x8826; 1.892 + const GLenum DRAW_BUFFER2_WEBGL = 0x8827; 1.893 + const GLenum DRAW_BUFFER3_WEBGL = 0x8828; 1.894 + const GLenum DRAW_BUFFER4_WEBGL = 0x8829; 1.895 + const GLenum DRAW_BUFFER5_WEBGL = 0x882A; 1.896 + const GLenum DRAW_BUFFER6_WEBGL = 0x882B; 1.897 + const GLenum DRAW_BUFFER7_WEBGL = 0x882C; 1.898 + const GLenum DRAW_BUFFER8_WEBGL = 0x882D; 1.899 + const GLenum DRAW_BUFFER9_WEBGL = 0x882E; 1.900 + const GLenum DRAW_BUFFER10_WEBGL = 0x882F; 1.901 + const GLenum DRAW_BUFFER11_WEBGL = 0x8830; 1.902 + const GLenum DRAW_BUFFER12_WEBGL = 0x8831; 1.903 + const GLenum DRAW_BUFFER13_WEBGL = 0x8832; 1.904 + const GLenum DRAW_BUFFER14_WEBGL = 0x8833; 1.905 + const GLenum DRAW_BUFFER15_WEBGL = 0x8834; 1.906 + 1.907 + const GLenum MAX_COLOR_ATTACHMENTS_WEBGL = 0x8CDF; 1.908 + const GLenum MAX_DRAW_BUFFERS_WEBGL = 0x8824; 1.909 + 1.910 + void drawBuffersWEBGL(sequence<GLenum> buffers); 1.911 +}; 1.912 + 1.913 +[NoInterfaceObject] 1.914 +interface WebGLExtensionTextureFloatLinear 1.915 +{ 1.916 +}; 1.917 + 1.918 +[NoInterfaceObject] 1.919 +interface WebGLExtensionTextureHalfFloat 1.920 +{ 1.921 + const GLenum HALF_FLOAT_OES = 0x8D61; 1.922 +}; 1.923 + 1.924 +[NoInterfaceObject] 1.925 +interface WebGLExtensionTextureHalfFloatLinear 1.926 +{ 1.927 +}; 1.928 + 1.929 +[NoInterfaceObject] 1.930 +interface WebGLExtensionColorBufferFloat 1.931 +{ 1.932 + const GLenum RGBA32F_EXT = 0x8814; 1.933 + const GLenum RGB32F_EXT = 0x8815; 1.934 + const GLenum FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE_EXT = 0x8211; 1.935 + const GLenum UNSIGNED_NORMALIZED_EXT = 0x8C17; 1.936 +}; 1.937 + 1.938 +[NoInterfaceObject] 1.939 +interface WebGLExtensionColorBufferHalfFloat 1.940 +{ 1.941 + const GLenum RGBA16F_EXT = 0x881A; 1.942 + const GLenum RGB16F_EXT = 0x881B; 1.943 + const GLenum FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE_EXT = 0x8211; 1.944 + const GLenum UNSIGNED_NORMALIZED_EXT = 0x8C17; 1.945 +}; 1.946 + 1.947 +[NoInterfaceObject] 1.948 +interface WebGLExtensionVertexArray { 1.949 + const GLenum VERTEX_ARRAY_BINDING_OES = 0x85B5; 1.950 + 1.951 + WebGLVertexArray? createVertexArrayOES(); 1.952 + void deleteVertexArrayOES(WebGLVertexArray? arrayObject); 1.953 + [WebGLHandlesContextLoss] GLboolean isVertexArrayOES(WebGLVertexArray? arrayObject); 1.954 + void bindVertexArrayOES(WebGLVertexArray? arrayObject); 1.955 +}; 1.956 + 1.957 +[NoInterfaceObject] 1.958 +interface WebGLExtensionInstancedArrays { 1.959 + const GLenum VERTEX_ATTRIB_ARRAY_DIVISOR_ANGLE = 0x88FE; 1.960 + 1.961 + void drawArraysInstancedANGLE(GLenum mode, GLint first, GLsizei count, GLsizei primcount); 1.962 + void drawElementsInstancedANGLE(GLenum mode, GLsizei count, GLenum type, GLintptr offset, GLsizei primcount); 1.963 + void vertexAttribDivisorANGLE(GLuint index, GLuint divisor); 1.964 +};