michael@0: /* -*- Mode: IDL; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ michael@0: /* This Source Code Form is subject to the terms of the Mozilla Public michael@0: * License, v. 2.0. If a copy of the MPL was not distributed with this file, michael@0: * You can obtain one at http://mozilla.org/MPL/2.0/. michael@0: * michael@0: * The origin of this IDL file is michael@0: * https://www.khronos.org/registry/webgl/specs/latest/webgl.idl michael@0: * michael@0: * Copyright © 2012 Khronos Group michael@0: */ michael@0: michael@0: // WebGL IDL definitions scraped from the Khronos specification: michael@0: // https://www.khronos.org/registry/webgl/specs/latest/ michael@0: // michael@0: // This IDL depends on the typed array specification defined at: michael@0: // https://www.khronos.org/registry/typedarray/specs/latest/typedarrays.idl michael@0: michael@0: typedef unsigned long GLenum; michael@0: typedef boolean GLboolean; michael@0: typedef unsigned long GLbitfield; michael@0: typedef byte GLbyte; /* 'byte' should be a signed 8 bit type. */ michael@0: typedef short GLshort; michael@0: typedef long GLint; michael@0: typedef long GLsizei; michael@0: typedef long long GLintptr; michael@0: typedef long long GLsizeiptr; michael@0: // Ideally the typedef below would use 'unsigned byte', but that doesn't currently exist in Web IDL. michael@0: typedef octet GLubyte; /* 'octet' should be an unsigned 8 bit type. */ michael@0: typedef unsigned short GLushort; michael@0: typedef unsigned long GLuint; michael@0: typedef unrestricted float GLfloat; michael@0: typedef unrestricted float GLclampf; michael@0: michael@0: dictionary WebGLContextAttributes { michael@0: // boolean alpha = true; michael@0: // We deviate from the spec here. michael@0: // If alpha isn't specified, we rely on a pref ("webgl.default-no-alpha") michael@0: boolean alpha; michael@0: boolean depth = true; michael@0: boolean stencil = false; michael@0: boolean antialias = true; michael@0: boolean premultipliedAlpha = true; michael@0: boolean preserveDrawingBuffer = false; michael@0: }; michael@0: michael@0: interface WebGLBuffer { michael@0: }; michael@0: michael@0: interface WebGLFramebuffer { michael@0: }; michael@0: michael@0: interface WebGLProgram { michael@0: }; michael@0: michael@0: interface WebGLRenderbuffer { michael@0: }; michael@0: michael@0: interface WebGLShader { michael@0: }; michael@0: michael@0: interface WebGLTexture { michael@0: }; michael@0: michael@0: interface WebGLUniformLocation { michael@0: }; michael@0: michael@0: interface WebGLVertexArray { michael@0: }; michael@0: michael@0: interface WebGLActiveInfo { michael@0: readonly attribute GLint size; michael@0: readonly attribute GLenum type; michael@0: readonly attribute DOMString name; michael@0: }; michael@0: michael@0: interface WebGLShaderPrecisionFormat { michael@0: readonly attribute GLint rangeMin; michael@0: readonly attribute GLint rangeMax; michael@0: readonly attribute GLint precision; michael@0: }; michael@0: michael@0: interface WebGLRenderingContext { michael@0: michael@0: /* ClearBufferMask */ michael@0: const GLenum DEPTH_BUFFER_BIT = 0x00000100; michael@0: const GLenum STENCIL_BUFFER_BIT = 0x00000400; michael@0: const GLenum COLOR_BUFFER_BIT = 0x00004000; michael@0: michael@0: /* BeginMode */ michael@0: const GLenum POINTS = 0x0000; michael@0: const GLenum LINES = 0x0001; michael@0: const GLenum LINE_LOOP = 0x0002; michael@0: const GLenum LINE_STRIP = 0x0003; michael@0: const GLenum TRIANGLES = 0x0004; michael@0: const GLenum TRIANGLE_STRIP = 0x0005; michael@0: const GLenum TRIANGLE_FAN = 0x0006; michael@0: michael@0: /* AlphaFunction (not supported in ES20) */ michael@0: /* NEVER */ michael@0: /* LESS */ michael@0: /* EQUAL */ michael@0: /* LEQUAL */ michael@0: /* GREATER */ michael@0: /* NOTEQUAL */ michael@0: /* GEQUAL */ michael@0: /* ALWAYS */ michael@0: michael@0: /* BlendingFactorDest */ michael@0: const GLenum ZERO = 0; michael@0: const GLenum ONE = 1; michael@0: const GLenum SRC_COLOR = 0x0300; michael@0: const GLenum ONE_MINUS_SRC_COLOR = 0x0301; michael@0: const GLenum SRC_ALPHA = 0x0302; michael@0: const GLenum ONE_MINUS_SRC_ALPHA = 0x0303; michael@0: const GLenum DST_ALPHA = 0x0304; michael@0: const GLenum ONE_MINUS_DST_ALPHA = 0x0305; michael@0: michael@0: /* BlendingFactorSrc */ michael@0: /* ZERO */ michael@0: /* ONE */ michael@0: const GLenum DST_COLOR = 0x0306; michael@0: const GLenum ONE_MINUS_DST_COLOR = 0x0307; michael@0: const GLenum SRC_ALPHA_SATURATE = 0x0308; michael@0: /* SRC_ALPHA */ michael@0: /* ONE_MINUS_SRC_ALPHA */ michael@0: /* DST_ALPHA */ michael@0: /* ONE_MINUS_DST_ALPHA */ michael@0: michael@0: /* BlendEquationSeparate */ michael@0: const GLenum FUNC_ADD = 0x8006; michael@0: const GLenum BLEND_EQUATION = 0x8009; michael@0: const GLenum BLEND_EQUATION_RGB = 0x8009; /* same as BLEND_EQUATION */ michael@0: const GLenum BLEND_EQUATION_ALPHA = 0x883D; michael@0: michael@0: /* BlendSubtract */ michael@0: const GLenum FUNC_SUBTRACT = 0x800A; michael@0: const GLenum FUNC_REVERSE_SUBTRACT = 0x800B; michael@0: michael@0: /* Separate Blend Functions */ michael@0: const GLenum BLEND_DST_RGB = 0x80C8; michael@0: const GLenum BLEND_SRC_RGB = 0x80C9; michael@0: const GLenum BLEND_DST_ALPHA = 0x80CA; michael@0: const GLenum BLEND_SRC_ALPHA = 0x80CB; michael@0: const GLenum CONSTANT_COLOR = 0x8001; michael@0: const GLenum ONE_MINUS_CONSTANT_COLOR = 0x8002; michael@0: const GLenum CONSTANT_ALPHA = 0x8003; michael@0: const GLenum ONE_MINUS_CONSTANT_ALPHA = 0x8004; michael@0: const GLenum BLEND_COLOR = 0x8005; michael@0: michael@0: /* Buffer Objects */ michael@0: const GLenum ARRAY_BUFFER = 0x8892; michael@0: const GLenum ELEMENT_ARRAY_BUFFER = 0x8893; michael@0: const GLenum ARRAY_BUFFER_BINDING = 0x8894; michael@0: const GLenum ELEMENT_ARRAY_BUFFER_BINDING = 0x8895; michael@0: michael@0: const GLenum STREAM_DRAW = 0x88E0; michael@0: const GLenum STATIC_DRAW = 0x88E4; michael@0: const GLenum DYNAMIC_DRAW = 0x88E8; michael@0: michael@0: const GLenum BUFFER_SIZE = 0x8764; michael@0: const GLenum BUFFER_USAGE = 0x8765; michael@0: michael@0: const GLenum CURRENT_VERTEX_ATTRIB = 0x8626; michael@0: michael@0: /* CullFaceMode */ michael@0: const GLenum FRONT = 0x0404; michael@0: const GLenum BACK = 0x0405; michael@0: const GLenum FRONT_AND_BACK = 0x0408; michael@0: michael@0: /* DepthFunction */ michael@0: /* NEVER */ michael@0: /* LESS */ michael@0: /* EQUAL */ michael@0: /* LEQUAL */ michael@0: /* GREATER */ michael@0: /* NOTEQUAL */ michael@0: /* GEQUAL */ michael@0: /* ALWAYS */ michael@0: michael@0: /* EnableCap */ michael@0: /* TEXTURE_2D */ michael@0: const GLenum CULL_FACE = 0x0B44; michael@0: const GLenum BLEND = 0x0BE2; michael@0: const GLenum DITHER = 0x0BD0; michael@0: const GLenum STENCIL_TEST = 0x0B90; michael@0: const GLenum DEPTH_TEST = 0x0B71; michael@0: const GLenum SCISSOR_TEST = 0x0C11; michael@0: const GLenum POLYGON_OFFSET_FILL = 0x8037; michael@0: const GLenum SAMPLE_ALPHA_TO_COVERAGE = 0x809E; michael@0: const GLenum SAMPLE_COVERAGE = 0x80A0; michael@0: michael@0: /* ErrorCode */ michael@0: const GLenum NO_ERROR = 0; michael@0: const GLenum INVALID_ENUM = 0x0500; michael@0: const GLenum INVALID_VALUE = 0x0501; michael@0: const GLenum INVALID_OPERATION = 0x0502; michael@0: const GLenum OUT_OF_MEMORY = 0x0505; michael@0: michael@0: /* FrontFaceDirection */ michael@0: const GLenum CW = 0x0900; michael@0: const GLenum CCW = 0x0901; michael@0: michael@0: /* GetPName */ michael@0: const GLenum LINE_WIDTH = 0x0B21; michael@0: const GLenum ALIASED_POINT_SIZE_RANGE = 0x846D; michael@0: const GLenum ALIASED_LINE_WIDTH_RANGE = 0x846E; michael@0: const GLenum CULL_FACE_MODE = 0x0B45; michael@0: const GLenum FRONT_FACE = 0x0B46; michael@0: const GLenum DEPTH_RANGE = 0x0B70; michael@0: const GLenum DEPTH_WRITEMASK = 0x0B72; michael@0: const GLenum DEPTH_CLEAR_VALUE = 0x0B73; michael@0: const GLenum DEPTH_FUNC = 0x0B74; michael@0: const GLenum STENCIL_CLEAR_VALUE = 0x0B91; michael@0: const GLenum STENCIL_FUNC = 0x0B92; michael@0: const GLenum STENCIL_FAIL = 0x0B94; michael@0: const GLenum STENCIL_PASS_DEPTH_FAIL = 0x0B95; michael@0: const GLenum STENCIL_PASS_DEPTH_PASS = 0x0B96; michael@0: const GLenum STENCIL_REF = 0x0B97; michael@0: const GLenum STENCIL_VALUE_MASK = 0x0B93; michael@0: const GLenum STENCIL_WRITEMASK = 0x0B98; michael@0: const GLenum STENCIL_BACK_FUNC = 0x8800; michael@0: const GLenum STENCIL_BACK_FAIL = 0x8801; michael@0: const GLenum STENCIL_BACK_PASS_DEPTH_FAIL = 0x8802; michael@0: const GLenum STENCIL_BACK_PASS_DEPTH_PASS = 0x8803; michael@0: const GLenum STENCIL_BACK_REF = 0x8CA3; michael@0: const GLenum STENCIL_BACK_VALUE_MASK = 0x8CA4; michael@0: const GLenum STENCIL_BACK_WRITEMASK = 0x8CA5; michael@0: const GLenum VIEWPORT = 0x0BA2; michael@0: const GLenum SCISSOR_BOX = 0x0C10; michael@0: /* SCISSOR_TEST */ michael@0: const GLenum COLOR_CLEAR_VALUE = 0x0C22; michael@0: const GLenum COLOR_WRITEMASK = 0x0C23; michael@0: const GLenum UNPACK_ALIGNMENT = 0x0CF5; michael@0: const GLenum PACK_ALIGNMENT = 0x0D05; michael@0: const GLenum MAX_TEXTURE_SIZE = 0x0D33; michael@0: const GLenum MAX_VIEWPORT_DIMS = 0x0D3A; michael@0: const GLenum SUBPIXEL_BITS = 0x0D50; michael@0: const GLenum RED_BITS = 0x0D52; michael@0: const GLenum GREEN_BITS = 0x0D53; michael@0: const GLenum BLUE_BITS = 0x0D54; michael@0: const GLenum ALPHA_BITS = 0x0D55; michael@0: const GLenum DEPTH_BITS = 0x0D56; michael@0: const GLenum STENCIL_BITS = 0x0D57; michael@0: const GLenum POLYGON_OFFSET_UNITS = 0x2A00; michael@0: /* POLYGON_OFFSET_FILL */ michael@0: const GLenum POLYGON_OFFSET_FACTOR = 0x8038; michael@0: const GLenum TEXTURE_BINDING_2D = 0x8069; michael@0: const GLenum SAMPLE_BUFFERS = 0x80A8; michael@0: const GLenum SAMPLES = 0x80A9; michael@0: const GLenum SAMPLE_COVERAGE_VALUE = 0x80AA; michael@0: const GLenum SAMPLE_COVERAGE_INVERT = 0x80AB; michael@0: michael@0: /* GetTextureParameter */ michael@0: /* TEXTURE_MAG_FILTER */ michael@0: /* TEXTURE_MIN_FILTER */ michael@0: /* TEXTURE_WRAP_S */ michael@0: /* TEXTURE_WRAP_T */ michael@0: michael@0: const GLenum COMPRESSED_TEXTURE_FORMATS = 0x86A3; michael@0: michael@0: /* HintMode */ michael@0: const GLenum DONT_CARE = 0x1100; michael@0: const GLenum FASTEST = 0x1101; michael@0: const GLenum NICEST = 0x1102; michael@0: michael@0: /* HintTarget */ michael@0: const GLenum GENERATE_MIPMAP_HINT = 0x8192; michael@0: michael@0: /* DataType */ michael@0: const GLenum BYTE = 0x1400; michael@0: const GLenum UNSIGNED_BYTE = 0x1401; michael@0: const GLenum SHORT = 0x1402; michael@0: const GLenum UNSIGNED_SHORT = 0x1403; michael@0: const GLenum INT = 0x1404; michael@0: const GLenum UNSIGNED_INT = 0x1405; michael@0: const GLenum FLOAT = 0x1406; michael@0: michael@0: /* PixelFormat */ michael@0: const GLenum DEPTH_COMPONENT = 0x1902; michael@0: const GLenum ALPHA = 0x1906; michael@0: const GLenum RGB = 0x1907; michael@0: const GLenum RGBA = 0x1908; michael@0: const GLenum LUMINANCE = 0x1909; michael@0: const GLenum LUMINANCE_ALPHA = 0x190A; michael@0: michael@0: /* PixelType */ michael@0: /* UNSIGNED_BYTE */ michael@0: const GLenum UNSIGNED_SHORT_4_4_4_4 = 0x8033; michael@0: const GLenum UNSIGNED_SHORT_5_5_5_1 = 0x8034; michael@0: const GLenum UNSIGNED_SHORT_5_6_5 = 0x8363; michael@0: michael@0: /* Shaders */ michael@0: const GLenum FRAGMENT_SHADER = 0x8B30; michael@0: const GLenum VERTEX_SHADER = 0x8B31; michael@0: const GLenum MAX_VERTEX_ATTRIBS = 0x8869; michael@0: const GLenum MAX_VERTEX_UNIFORM_VECTORS = 0x8DFB; michael@0: const GLenum MAX_VARYING_VECTORS = 0x8DFC; michael@0: const GLenum MAX_COMBINED_TEXTURE_IMAGE_UNITS = 0x8B4D; michael@0: const GLenum MAX_VERTEX_TEXTURE_IMAGE_UNITS = 0x8B4C; michael@0: const GLenum MAX_TEXTURE_IMAGE_UNITS = 0x8872; michael@0: const GLenum MAX_FRAGMENT_UNIFORM_VECTORS = 0x8DFD; michael@0: const GLenum SHADER_TYPE = 0x8B4F; michael@0: const GLenum DELETE_STATUS = 0x8B80; michael@0: const GLenum LINK_STATUS = 0x8B82; michael@0: const GLenum VALIDATE_STATUS = 0x8B83; michael@0: const GLenum ATTACHED_SHADERS = 0x8B85; michael@0: const GLenum ACTIVE_UNIFORMS = 0x8B86; michael@0: const GLenum ACTIVE_ATTRIBUTES = 0x8B89; michael@0: const GLenum SHADING_LANGUAGE_VERSION = 0x8B8C; michael@0: const GLenum CURRENT_PROGRAM = 0x8B8D; michael@0: michael@0: /* StencilFunction */ michael@0: const GLenum NEVER = 0x0200; michael@0: const GLenum LESS = 0x0201; michael@0: const GLenum EQUAL = 0x0202; michael@0: const GLenum LEQUAL = 0x0203; michael@0: const GLenum GREATER = 0x0204; michael@0: const GLenum NOTEQUAL = 0x0205; michael@0: const GLenum GEQUAL = 0x0206; michael@0: const GLenum ALWAYS = 0x0207; michael@0: michael@0: /* StencilOp */ michael@0: /* ZERO */ michael@0: const GLenum KEEP = 0x1E00; michael@0: const GLenum REPLACE = 0x1E01; michael@0: const GLenum INCR = 0x1E02; michael@0: const GLenum DECR = 0x1E03; michael@0: const GLenum INVERT = 0x150A; michael@0: const GLenum INCR_WRAP = 0x8507; michael@0: const GLenum DECR_WRAP = 0x8508; michael@0: michael@0: /* StringName */ michael@0: const GLenum VENDOR = 0x1F00; michael@0: const GLenum RENDERER = 0x1F01; michael@0: const GLenum VERSION = 0x1F02; michael@0: michael@0: /* TextureMagFilter */ michael@0: const GLenum NEAREST = 0x2600; michael@0: const GLenum LINEAR = 0x2601; michael@0: michael@0: /* TextureMinFilter */ michael@0: /* NEAREST */ michael@0: /* LINEAR */ michael@0: const GLenum NEAREST_MIPMAP_NEAREST = 0x2700; michael@0: const GLenum LINEAR_MIPMAP_NEAREST = 0x2701; michael@0: const GLenum NEAREST_MIPMAP_LINEAR = 0x2702; michael@0: const GLenum LINEAR_MIPMAP_LINEAR = 0x2703; michael@0: michael@0: /* TextureParameterName */ michael@0: const GLenum TEXTURE_MAG_FILTER = 0x2800; michael@0: const GLenum TEXTURE_MIN_FILTER = 0x2801; michael@0: const GLenum TEXTURE_WRAP_S = 0x2802; michael@0: const GLenum TEXTURE_WRAP_T = 0x2803; michael@0: michael@0: /* TextureTarget */ michael@0: const GLenum TEXTURE_2D = 0x0DE1; michael@0: const GLenum TEXTURE = 0x1702; michael@0: michael@0: const GLenum TEXTURE_CUBE_MAP = 0x8513; michael@0: const GLenum TEXTURE_BINDING_CUBE_MAP = 0x8514; michael@0: const GLenum TEXTURE_CUBE_MAP_POSITIVE_X = 0x8515; michael@0: const GLenum TEXTURE_CUBE_MAP_NEGATIVE_X = 0x8516; michael@0: const GLenum TEXTURE_CUBE_MAP_POSITIVE_Y = 0x8517; michael@0: const GLenum TEXTURE_CUBE_MAP_NEGATIVE_Y = 0x8518; michael@0: const GLenum TEXTURE_CUBE_MAP_POSITIVE_Z = 0x8519; michael@0: const GLenum TEXTURE_CUBE_MAP_NEGATIVE_Z = 0x851A; michael@0: const GLenum MAX_CUBE_MAP_TEXTURE_SIZE = 0x851C; michael@0: michael@0: /* TextureUnit */ michael@0: const GLenum TEXTURE0 = 0x84C0; michael@0: const GLenum TEXTURE1 = 0x84C1; michael@0: const GLenum TEXTURE2 = 0x84C2; michael@0: const GLenum TEXTURE3 = 0x84C3; michael@0: const GLenum TEXTURE4 = 0x84C4; michael@0: const GLenum TEXTURE5 = 0x84C5; michael@0: const GLenum TEXTURE6 = 0x84C6; michael@0: const GLenum TEXTURE7 = 0x84C7; michael@0: const GLenum TEXTURE8 = 0x84C8; michael@0: const GLenum TEXTURE9 = 0x84C9; michael@0: const GLenum TEXTURE10 = 0x84CA; michael@0: const GLenum TEXTURE11 = 0x84CB; michael@0: const GLenum TEXTURE12 = 0x84CC; michael@0: const GLenum TEXTURE13 = 0x84CD; michael@0: const GLenum TEXTURE14 = 0x84CE; michael@0: const GLenum TEXTURE15 = 0x84CF; michael@0: const GLenum TEXTURE16 = 0x84D0; michael@0: const GLenum TEXTURE17 = 0x84D1; michael@0: const GLenum TEXTURE18 = 0x84D2; michael@0: const GLenum TEXTURE19 = 0x84D3; michael@0: const GLenum TEXTURE20 = 0x84D4; michael@0: const GLenum TEXTURE21 = 0x84D5; michael@0: const GLenum TEXTURE22 = 0x84D6; michael@0: const GLenum TEXTURE23 = 0x84D7; michael@0: const GLenum TEXTURE24 = 0x84D8; michael@0: const GLenum TEXTURE25 = 0x84D9; michael@0: const GLenum TEXTURE26 = 0x84DA; michael@0: const GLenum TEXTURE27 = 0x84DB; michael@0: const GLenum TEXTURE28 = 0x84DC; michael@0: const GLenum TEXTURE29 = 0x84DD; michael@0: const GLenum TEXTURE30 = 0x84DE; michael@0: const GLenum TEXTURE31 = 0x84DF; michael@0: const GLenum ACTIVE_TEXTURE = 0x84E0; michael@0: michael@0: /* TextureWrapMode */ michael@0: const GLenum REPEAT = 0x2901; michael@0: const GLenum CLAMP_TO_EDGE = 0x812F; michael@0: const GLenum MIRRORED_REPEAT = 0x8370; michael@0: michael@0: /* Uniform Types */ michael@0: const GLenum FLOAT_VEC2 = 0x8B50; michael@0: const GLenum FLOAT_VEC3 = 0x8B51; michael@0: const GLenum FLOAT_VEC4 = 0x8B52; michael@0: const GLenum INT_VEC2 = 0x8B53; michael@0: const GLenum INT_VEC3 = 0x8B54; michael@0: const GLenum INT_VEC4 = 0x8B55; michael@0: const GLenum BOOL = 0x8B56; michael@0: const GLenum BOOL_VEC2 = 0x8B57; michael@0: const GLenum BOOL_VEC3 = 0x8B58; michael@0: const GLenum BOOL_VEC4 = 0x8B59; michael@0: const GLenum FLOAT_MAT2 = 0x8B5A; michael@0: const GLenum FLOAT_MAT3 = 0x8B5B; michael@0: const GLenum FLOAT_MAT4 = 0x8B5C; michael@0: const GLenum SAMPLER_2D = 0x8B5E; michael@0: const GLenum SAMPLER_CUBE = 0x8B60; michael@0: michael@0: /* Vertex Arrays */ michael@0: const GLenum VERTEX_ATTRIB_ARRAY_ENABLED = 0x8622; michael@0: const GLenum VERTEX_ATTRIB_ARRAY_SIZE = 0x8623; michael@0: const GLenum VERTEX_ATTRIB_ARRAY_STRIDE = 0x8624; michael@0: const GLenum VERTEX_ATTRIB_ARRAY_TYPE = 0x8625; michael@0: const GLenum VERTEX_ATTRIB_ARRAY_NORMALIZED = 0x886A; michael@0: const GLenum VERTEX_ATTRIB_ARRAY_POINTER = 0x8645; michael@0: const GLenum VERTEX_ATTRIB_ARRAY_BUFFER_BINDING = 0x889F; michael@0: michael@0: /* Shader Source */ michael@0: const GLenum COMPILE_STATUS = 0x8B81; michael@0: michael@0: /* Shader Precision-Specified Types */ michael@0: const GLenum LOW_FLOAT = 0x8DF0; michael@0: const GLenum MEDIUM_FLOAT = 0x8DF1; michael@0: const GLenum HIGH_FLOAT = 0x8DF2; michael@0: const GLenum LOW_INT = 0x8DF3; michael@0: const GLenum MEDIUM_INT = 0x8DF4; michael@0: const GLenum HIGH_INT = 0x8DF5; michael@0: michael@0: /* Framebuffer Object. */ michael@0: const GLenum FRAMEBUFFER = 0x8D40; michael@0: const GLenum RENDERBUFFER = 0x8D41; michael@0: michael@0: const GLenum RGBA4 = 0x8056; michael@0: const GLenum RGB5_A1 = 0x8057; michael@0: const GLenum RGB565 = 0x8D62; michael@0: const GLenum DEPTH_COMPONENT16 = 0x81A5; michael@0: const GLenum STENCIL_INDEX = 0x1901; michael@0: const GLenum STENCIL_INDEX8 = 0x8D48; michael@0: const GLenum DEPTH_STENCIL = 0x84F9; michael@0: michael@0: const GLenum RENDERBUFFER_WIDTH = 0x8D42; michael@0: const GLenum RENDERBUFFER_HEIGHT = 0x8D43; michael@0: const GLenum RENDERBUFFER_INTERNAL_FORMAT = 0x8D44; michael@0: const GLenum RENDERBUFFER_RED_SIZE = 0x8D50; michael@0: const GLenum RENDERBUFFER_GREEN_SIZE = 0x8D51; michael@0: const GLenum RENDERBUFFER_BLUE_SIZE = 0x8D52; michael@0: const GLenum RENDERBUFFER_ALPHA_SIZE = 0x8D53; michael@0: const GLenum RENDERBUFFER_DEPTH_SIZE = 0x8D54; michael@0: const GLenum RENDERBUFFER_STENCIL_SIZE = 0x8D55; michael@0: michael@0: const GLenum FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE = 0x8CD0; michael@0: const GLenum FRAMEBUFFER_ATTACHMENT_OBJECT_NAME = 0x8CD1; michael@0: const GLenum FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL = 0x8CD2; michael@0: const GLenum FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE = 0x8CD3; michael@0: michael@0: const GLenum COLOR_ATTACHMENT0 = 0x8CE0; michael@0: const GLenum DEPTH_ATTACHMENT = 0x8D00; michael@0: const GLenum STENCIL_ATTACHMENT = 0x8D20; michael@0: const GLenum DEPTH_STENCIL_ATTACHMENT = 0x821A; michael@0: michael@0: const GLenum NONE = 0; michael@0: michael@0: const GLenum FRAMEBUFFER_COMPLETE = 0x8CD5; michael@0: const GLenum FRAMEBUFFER_INCOMPLETE_ATTACHMENT = 0x8CD6; michael@0: const GLenum FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT = 0x8CD7; michael@0: const GLenum FRAMEBUFFER_INCOMPLETE_DIMENSIONS = 0x8CD9; michael@0: const GLenum FRAMEBUFFER_UNSUPPORTED = 0x8CDD; michael@0: michael@0: const GLenum FRAMEBUFFER_BINDING = 0x8CA6; michael@0: const GLenum RENDERBUFFER_BINDING = 0x8CA7; michael@0: const GLenum MAX_RENDERBUFFER_SIZE = 0x84E8; michael@0: michael@0: const GLenum INVALID_FRAMEBUFFER_OPERATION = 0x0506; michael@0: michael@0: /* WebGL-specific enums */ michael@0: const GLenum UNPACK_FLIP_Y_WEBGL = 0x9240; michael@0: const GLenum UNPACK_PREMULTIPLY_ALPHA_WEBGL = 0x9241; michael@0: const GLenum CONTEXT_LOST_WEBGL = 0x9242; michael@0: const GLenum UNPACK_COLORSPACE_CONVERSION_WEBGL = 0x9243; michael@0: const GLenum BROWSER_DEFAULT_WEBGL = 0x9244; michael@0: michael@0: // The canvas might actually be null in some cases, apparently. michael@0: readonly attribute HTMLCanvasElement? canvas; michael@0: readonly attribute GLsizei drawingBufferWidth; michael@0: readonly attribute GLsizei drawingBufferHeight; michael@0: michael@0: [WebGLHandlesContextLoss] WebGLContextAttributes? getContextAttributes(); michael@0: [WebGLHandlesContextLoss] boolean isContextLost(); michael@0: michael@0: sequence? getSupportedExtensions(); michael@0: michael@0: [Throws] michael@0: object? getExtension(DOMString name); michael@0: michael@0: void activeTexture(GLenum texture); michael@0: void attachShader(WebGLProgram? program, WebGLShader? shader); michael@0: void bindAttribLocation(WebGLProgram? program, GLuint index, DOMString name); michael@0: void bindBuffer(GLenum target, WebGLBuffer? buffer); michael@0: void bindFramebuffer(GLenum target, WebGLFramebuffer? framebuffer); michael@0: void bindRenderbuffer(GLenum target, WebGLRenderbuffer? renderbuffer); michael@0: void bindTexture(GLenum target, WebGLTexture? texture); michael@0: void blendColor(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha); michael@0: void blendEquation(GLenum mode); michael@0: void blendEquationSeparate(GLenum modeRGB, GLenum modeAlpha); michael@0: void blendFunc(GLenum sfactor, GLenum dfactor); michael@0: void blendFuncSeparate(GLenum srcRGB, GLenum dstRGB, michael@0: GLenum srcAlpha, GLenum dstAlpha); michael@0: michael@0: void bufferData(GLenum target, GLsizeiptr size, GLenum usage); michael@0: void bufferData(GLenum target, ArrayBufferView data, GLenum usage); michael@0: void bufferData(GLenum target, ArrayBuffer? data, GLenum usage); michael@0: void bufferSubData(GLenum target, GLintptr offset, ArrayBufferView data); michael@0: void bufferSubData(GLenum target, GLintptr offset, ArrayBuffer? data); michael@0: michael@0: [WebGLHandlesContextLoss] GLenum checkFramebufferStatus(GLenum target); michael@0: void clear(GLbitfield mask); michael@0: void clearColor(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha); michael@0: void clearDepth(GLclampf depth); michael@0: void clearStencil(GLint s); michael@0: void colorMask(GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha); michael@0: void compileShader(WebGLShader? shader); michael@0: michael@0: void compressedTexImage2D(GLenum target, GLint level, GLenum internalformat, michael@0: GLsizei width, GLsizei height, GLint border, michael@0: ArrayBufferView data); michael@0: void compressedTexSubImage2D(GLenum target, GLint level, michael@0: GLint xoffset, GLint yoffset, michael@0: GLsizei width, GLsizei height, GLenum format, michael@0: ArrayBufferView data); michael@0: michael@0: void copyTexImage2D(GLenum target, GLint level, GLenum internalformat, michael@0: GLint x, GLint y, GLsizei width, GLsizei height, michael@0: GLint border); michael@0: void copyTexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, michael@0: GLint x, GLint y, GLsizei width, GLsizei height); michael@0: michael@0: WebGLBuffer? createBuffer(); michael@0: WebGLFramebuffer? createFramebuffer(); michael@0: WebGLProgram? createProgram(); michael@0: WebGLRenderbuffer? createRenderbuffer(); michael@0: WebGLShader? createShader(GLenum type); michael@0: WebGLTexture? createTexture(); michael@0: michael@0: void cullFace(GLenum mode); michael@0: michael@0: void deleteBuffer(WebGLBuffer? buffer); michael@0: void deleteFramebuffer(WebGLFramebuffer? framebuffer); michael@0: void deleteProgram(WebGLProgram? program); michael@0: void deleteRenderbuffer(WebGLRenderbuffer? renderbuffer); michael@0: void deleteShader(WebGLShader? shader); michael@0: void deleteTexture(WebGLTexture? texture); michael@0: michael@0: void depthFunc(GLenum func); michael@0: void depthMask(GLboolean flag); michael@0: void depthRange(GLclampf zNear, GLclampf zFar); michael@0: void detachShader(WebGLProgram? program, WebGLShader? shader); michael@0: void disable(GLenum cap); michael@0: void disableVertexAttribArray(GLuint index); michael@0: void drawArrays(GLenum mode, GLint first, GLsizei count); michael@0: void drawElements(GLenum mode, GLsizei count, GLenum type, GLintptr offset); michael@0: michael@0: void enable(GLenum cap); michael@0: void enableVertexAttribArray(GLuint index); michael@0: void finish(); michael@0: void flush(); michael@0: void framebufferRenderbuffer(GLenum target, GLenum attachment, michael@0: GLenum renderbuffertarget, michael@0: WebGLRenderbuffer? renderbuffer); michael@0: void framebufferTexture2D(GLenum target, GLenum attachment, GLenum textarget, michael@0: WebGLTexture? texture, GLint level); michael@0: void frontFace(GLenum mode); michael@0: michael@0: void generateMipmap(GLenum target); michael@0: michael@0: [NewObject] michael@0: WebGLActiveInfo? getActiveAttrib(WebGLProgram? program, GLuint index); michael@0: [NewObject] michael@0: WebGLActiveInfo? getActiveUniform(WebGLProgram? program, GLuint index); michael@0: michael@0: sequence? getAttachedShaders(WebGLProgram? program); michael@0: michael@0: [WebGLHandlesContextLoss] GLint getAttribLocation(WebGLProgram? program, DOMString name); michael@0: michael@0: any getBufferParameter(GLenum target, GLenum pname); michael@0: [Throws] michael@0: any getParameter(GLenum pname); michael@0: michael@0: [WebGLHandlesContextLoss] GLenum getError(); michael@0: michael@0: [Throws] michael@0: any getFramebufferAttachmentParameter(GLenum target, GLenum attachment, michael@0: GLenum pname); michael@0: any getProgramParameter(WebGLProgram? program, GLenum pname); michael@0: DOMString? getProgramInfoLog(WebGLProgram? program); michael@0: any getRenderbufferParameter(GLenum target, GLenum pname); michael@0: any getShaderParameter(WebGLShader? shader, GLenum pname); michael@0: michael@0: [NewObject] michael@0: WebGLShaderPrecisionFormat? getShaderPrecisionFormat(GLenum shadertype, GLenum precisiontype); michael@0: michael@0: DOMString? getShaderInfoLog(WebGLShader? shader); michael@0: michael@0: DOMString? getShaderSource(WebGLShader? shader); michael@0: michael@0: any getTexParameter(GLenum target, GLenum pname); michael@0: michael@0: any getUniform(WebGLProgram? program, WebGLUniformLocation? location); michael@0: michael@0: [NewObject] michael@0: WebGLUniformLocation? getUniformLocation(WebGLProgram? program, DOMString name); michael@0: michael@0: [Throws] michael@0: any getVertexAttrib(GLuint index, GLenum pname); michael@0: michael@0: [WebGLHandlesContextLoss] GLsizeiptr getVertexAttribOffset(GLuint index, GLenum pname); michael@0: michael@0: void hint(GLenum target, GLenum mode); michael@0: [WebGLHandlesContextLoss] GLboolean isBuffer(WebGLBuffer? buffer); michael@0: [WebGLHandlesContextLoss] GLboolean isEnabled(GLenum cap); michael@0: [WebGLHandlesContextLoss] GLboolean isFramebuffer(WebGLFramebuffer? framebuffer); michael@0: [WebGLHandlesContextLoss] GLboolean isProgram(WebGLProgram? program); michael@0: [WebGLHandlesContextLoss] GLboolean isRenderbuffer(WebGLRenderbuffer? renderbuffer); michael@0: [WebGLHandlesContextLoss] GLboolean isShader(WebGLShader? shader); michael@0: [WebGLHandlesContextLoss] GLboolean isTexture(WebGLTexture? texture); michael@0: void lineWidth(GLfloat width); michael@0: void linkProgram(WebGLProgram? program); michael@0: void pixelStorei(GLenum pname, GLint param); michael@0: void polygonOffset(GLfloat factor, GLfloat units); michael@0: michael@0: [Throws] michael@0: void readPixels(GLint x, GLint y, GLsizei width, GLsizei height, michael@0: GLenum format, GLenum type, ArrayBufferView? pixels); michael@0: michael@0: void renderbufferStorage(GLenum target, GLenum internalformat, michael@0: GLsizei width, GLsizei height); michael@0: void sampleCoverage(GLclampf value, GLboolean invert); michael@0: void scissor(GLint x, GLint y, GLsizei width, GLsizei height); michael@0: michael@0: void shaderSource(WebGLShader? shader, DOMString source); michael@0: michael@0: void stencilFunc(GLenum func, GLint ref, GLuint mask); michael@0: void stencilFuncSeparate(GLenum face, GLenum func, GLint ref, GLuint mask); michael@0: void stencilMask(GLuint mask); michael@0: void stencilMaskSeparate(GLenum face, GLuint mask); michael@0: void stencilOp(GLenum fail, GLenum zfail, GLenum zpass); michael@0: void stencilOpSeparate(GLenum face, GLenum fail, GLenum zfail, GLenum zpass); michael@0: michael@0: michael@0: [Throws] michael@0: void texImage2D(GLenum target, GLint level, GLenum internalformat, michael@0: GLsizei width, GLsizei height, GLint border, GLenum format, michael@0: GLenum type, ArrayBufferView? pixels); michael@0: [Throws] michael@0: void texImage2D(GLenum target, GLint level, GLenum internalformat, michael@0: GLenum format, GLenum type, ImageData? pixels); michael@0: [Throws] michael@0: void texImage2D(GLenum target, GLint level, GLenum internalformat, michael@0: GLenum format, GLenum type, HTMLImageElement image); // May throw DOMException michael@0: [Throws] michael@0: void texImage2D(GLenum target, GLint level, GLenum internalformat, michael@0: GLenum format, GLenum type, HTMLCanvasElement canvas); // May throw DOMException michael@0: [Throws] michael@0: void texImage2D(GLenum target, GLint level, GLenum internalformat, michael@0: GLenum format, GLenum type, HTMLVideoElement video); // May throw DOMException michael@0: michael@0: void texParameterf(GLenum target, GLenum pname, GLfloat param); michael@0: void texParameteri(GLenum target, GLenum pname, GLint param); michael@0: michael@0: [Throws] michael@0: void texSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, michael@0: GLsizei width, GLsizei height, michael@0: GLenum format, GLenum type, ArrayBufferView? pixels); michael@0: [Throws] michael@0: void texSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, michael@0: GLenum format, GLenum type, ImageData? pixels); michael@0: [Throws] michael@0: void texSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, michael@0: GLenum format, GLenum type, HTMLImageElement image); // May throw DOMException michael@0: [Throws] michael@0: void texSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, michael@0: GLenum format, GLenum type, HTMLCanvasElement canvas); // May throw DOMException michael@0: [Throws] michael@0: void texSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, michael@0: GLenum format, GLenum type, HTMLVideoElement video); // May throw DOMException michael@0: michael@0: void uniform1f(WebGLUniformLocation? location, GLfloat x); michael@0: void uniform1fv(WebGLUniformLocation? location, Float32Array v); michael@0: void uniform1fv(WebGLUniformLocation? location, sequence v); michael@0: void uniform1i(WebGLUniformLocation? location, GLint x); michael@0: void uniform1iv(WebGLUniformLocation? location, Int32Array v); michael@0: void uniform1iv(WebGLUniformLocation? location, sequence v); michael@0: void uniform2f(WebGLUniformLocation? location, GLfloat x, GLfloat y); michael@0: void uniform2fv(WebGLUniformLocation? location, Float32Array v); michael@0: void uniform2fv(WebGLUniformLocation? location, sequence v); michael@0: void uniform2i(WebGLUniformLocation? location, GLint x, GLint y); michael@0: void uniform2iv(WebGLUniformLocation? location, Int32Array v); michael@0: void uniform2iv(WebGLUniformLocation? location, sequence v); michael@0: void uniform3f(WebGLUniformLocation? location, GLfloat x, GLfloat y, GLfloat z); michael@0: void uniform3fv(WebGLUniformLocation? location, Float32Array v); michael@0: void uniform3fv(WebGLUniformLocation? location, sequence v); michael@0: void uniform3i(WebGLUniformLocation? location, GLint x, GLint y, GLint z); michael@0: void uniform3iv(WebGLUniformLocation? location, Int32Array v); michael@0: void uniform3iv(WebGLUniformLocation? location, sequence v); michael@0: void uniform4f(WebGLUniformLocation? location, GLfloat x, GLfloat y, GLfloat z, GLfloat w); michael@0: void uniform4fv(WebGLUniformLocation? location, Float32Array v); michael@0: void uniform4fv(WebGLUniformLocation? location, sequence v); michael@0: void uniform4i(WebGLUniformLocation? location, GLint x, GLint y, GLint z, GLint w); michael@0: void uniform4iv(WebGLUniformLocation? location, Int32Array v); michael@0: void uniform4iv(WebGLUniformLocation? location, sequence v); michael@0: michael@0: void uniformMatrix2fv(WebGLUniformLocation? location, GLboolean transpose, michael@0: Float32Array value); michael@0: void uniformMatrix2fv(WebGLUniformLocation? location, GLboolean transpose, michael@0: sequence value); michael@0: void uniformMatrix3fv(WebGLUniformLocation? location, GLboolean transpose, michael@0: Float32Array value); michael@0: void uniformMatrix3fv(WebGLUniformLocation? location, GLboolean transpose, michael@0: sequence value); michael@0: void uniformMatrix4fv(WebGLUniformLocation? location, GLboolean transpose, michael@0: Float32Array value); michael@0: void uniformMatrix4fv(WebGLUniformLocation? location, GLboolean transpose, michael@0: sequence value); michael@0: michael@0: void useProgram(WebGLProgram? program); michael@0: void validateProgram(WebGLProgram? program); michael@0: michael@0: void vertexAttrib1f(GLuint indx, GLfloat x); michael@0: void vertexAttrib1fv(GLuint indx, Float32Array values); michael@0: void vertexAttrib1fv(GLuint indx, sequence values); michael@0: void vertexAttrib2f(GLuint indx, GLfloat x, GLfloat y); michael@0: void vertexAttrib2fv(GLuint indx, Float32Array values); michael@0: void vertexAttrib2fv(GLuint indx, sequence values); michael@0: void vertexAttrib3f(GLuint indx, GLfloat x, GLfloat y, GLfloat z); michael@0: void vertexAttrib3fv(GLuint indx, Float32Array values); michael@0: void vertexAttrib3fv(GLuint indx, sequence values); michael@0: void vertexAttrib4f(GLuint indx, GLfloat x, GLfloat y, GLfloat z, GLfloat w); michael@0: void vertexAttrib4fv(GLuint indx, Float32Array values); michael@0: void vertexAttrib4fv(GLuint indx, sequence values); michael@0: void vertexAttribPointer(GLuint indx, GLint size, GLenum type, michael@0: GLboolean normalized, GLsizei stride, GLintptr offset); michael@0: michael@0: void viewport(GLint x, GLint y, GLsizei width, GLsizei height); michael@0: }; michael@0: michael@0: /*[Constructor(DOMString type, optional WebGLContextEventInit eventInit)] michael@0: interface WebGLContextEvent : Event { michael@0: readonly attribute DOMString statusMessage; michael@0: };*/ michael@0: michael@0: // EventInit is defined in the DOM4 specification. michael@0: /*dictionary WebGLContextEventInit : EventInit { michael@0: DOMString statusMessage; michael@0: };*/ michael@0: michael@0: michael@0: // specific extension interfaces michael@0: michael@0: [NoInterfaceObject] michael@0: interface WebGLExtensionCompressedTextureS3TC michael@0: { michael@0: const GLenum COMPRESSED_RGB_S3TC_DXT1_EXT = 0x83F0; michael@0: const GLenum COMPRESSED_RGBA_S3TC_DXT1_EXT = 0x83F1; michael@0: const GLenum COMPRESSED_RGBA_S3TC_DXT3_EXT = 0x83F2; michael@0: const GLenum COMPRESSED_RGBA_S3TC_DXT5_EXT = 0x83F3; michael@0: }; michael@0: michael@0: [NoInterfaceObject] michael@0: interface WebGLExtensionCompressedTextureATC michael@0: { michael@0: const GLenum COMPRESSED_RGB_ATC_WEBGL = 0x8C92; michael@0: const GLenum COMPRESSED_RGBA_ATC_EXPLICIT_ALPHA_WEBGL = 0x8C93; michael@0: const GLenum COMPRESSED_RGBA_ATC_INTERPOLATED_ALPHA_WEBGL = 0x87EE; michael@0: }; michael@0: michael@0: [NoInterfaceObject] michael@0: interface WebGLExtensionCompressedTextureETC1 michael@0: { michael@0: const GLenum COMPRESSED_RGB_ETC1_WEBGL = 0x8D64; michael@0: }; michael@0: michael@0: [NoInterfaceObject] michael@0: interface WebGLExtensionCompressedTexturePVRTC michael@0: { michael@0: const GLenum COMPRESSED_RGB_PVRTC_4BPPV1 = 0x8C00; michael@0: const GLenum COMPRESSED_RGB_PVRTC_2BPPV1 = 0x8C01; michael@0: const GLenum COMPRESSED_RGBA_PVRTC_4BPPV1 = 0x8C02; michael@0: const GLenum COMPRESSED_RGBA_PVRTC_2BPPV1 = 0x8C03; michael@0: }; michael@0: michael@0: [NoInterfaceObject] michael@0: interface WebGLExtensionDebugRendererInfo michael@0: { michael@0: const GLenum UNMASKED_VENDOR_WEBGL = 0x9245; michael@0: const GLenum UNMASKED_RENDERER_WEBGL = 0x9246; michael@0: }; michael@0: michael@0: [NoInterfaceObject] michael@0: interface WebGLExtensionDebugShaders michael@0: { michael@0: DOMString getTranslatedShaderSource(WebGLShader? shader); michael@0: }; michael@0: michael@0: [NoInterfaceObject] michael@0: interface WebGLExtensionDepthTexture michael@0: { michael@0: const GLenum UNSIGNED_INT_24_8_WEBGL = 0x84FA; michael@0: }; michael@0: michael@0: [NoInterfaceObject] michael@0: interface WebGLExtensionElementIndexUint michael@0: { michael@0: }; michael@0: michael@0: [NoInterfaceObject] michael@0: interface WebGLExtensionFragDepth michael@0: { michael@0: }; michael@0: michael@0: [NoInterfaceObject] michael@0: interface WebGLExtensionLoseContext { michael@0: void loseContext(); michael@0: void restoreContext(); michael@0: }; michael@0: michael@0: [NoInterfaceObject] michael@0: interface WebGLExtensionTextureFilterAnisotropic michael@0: { michael@0: const GLenum TEXTURE_MAX_ANISOTROPY_EXT = 0x84FE; michael@0: const GLenum MAX_TEXTURE_MAX_ANISOTROPY_EXT = 0x84FF; michael@0: }; michael@0: michael@0: [NoInterfaceObject] michael@0: interface WebGLExtensionSRGB michael@0: { michael@0: const GLenum SRGB_EXT = 0x8C40; michael@0: const GLenum SRGB_ALPHA_EXT = 0x8C42; michael@0: const GLenum SRGB8_ALPHA8_EXT = 0x8C43; michael@0: const GLenum FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING_EXT = 0x8210; michael@0: }; michael@0: michael@0: [NoInterfaceObject] michael@0: interface WebGLExtensionStandardDerivatives { michael@0: const GLenum FRAGMENT_SHADER_DERIVATIVE_HINT_OES = 0x8B8B; michael@0: }; michael@0: michael@0: [NoInterfaceObject] michael@0: interface WebGLExtensionTextureFloat michael@0: { michael@0: }; michael@0: michael@0: [NoInterfaceObject] michael@0: interface WebGLExtensionDrawBuffers { michael@0: const GLenum COLOR_ATTACHMENT0_WEBGL = 0x8CE0; michael@0: const GLenum COLOR_ATTACHMENT1_WEBGL = 0x8CE1; michael@0: const GLenum COLOR_ATTACHMENT2_WEBGL = 0x8CE2; michael@0: const GLenum COLOR_ATTACHMENT3_WEBGL = 0x8CE3; michael@0: const GLenum COLOR_ATTACHMENT4_WEBGL = 0x8CE4; michael@0: const GLenum COLOR_ATTACHMENT5_WEBGL = 0x8CE5; michael@0: const GLenum COLOR_ATTACHMENT6_WEBGL = 0x8CE6; michael@0: const GLenum COLOR_ATTACHMENT7_WEBGL = 0x8CE7; michael@0: const GLenum COLOR_ATTACHMENT8_WEBGL = 0x8CE8; michael@0: const GLenum COLOR_ATTACHMENT9_WEBGL = 0x8CE9; michael@0: const GLenum COLOR_ATTACHMENT10_WEBGL = 0x8CEA; michael@0: const GLenum COLOR_ATTACHMENT11_WEBGL = 0x8CEB; michael@0: const GLenum COLOR_ATTACHMENT12_WEBGL = 0x8CEC; michael@0: const GLenum COLOR_ATTACHMENT13_WEBGL = 0x8CED; michael@0: const GLenum COLOR_ATTACHMENT14_WEBGL = 0x8CEE; michael@0: const GLenum COLOR_ATTACHMENT15_WEBGL = 0x8CEF; michael@0: michael@0: const GLenum DRAW_BUFFER0_WEBGL = 0x8825; michael@0: const GLenum DRAW_BUFFER1_WEBGL = 0x8826; michael@0: const GLenum DRAW_BUFFER2_WEBGL = 0x8827; michael@0: const GLenum DRAW_BUFFER3_WEBGL = 0x8828; michael@0: const GLenum DRAW_BUFFER4_WEBGL = 0x8829; michael@0: const GLenum DRAW_BUFFER5_WEBGL = 0x882A; michael@0: const GLenum DRAW_BUFFER6_WEBGL = 0x882B; michael@0: const GLenum DRAW_BUFFER7_WEBGL = 0x882C; michael@0: const GLenum DRAW_BUFFER8_WEBGL = 0x882D; michael@0: const GLenum DRAW_BUFFER9_WEBGL = 0x882E; michael@0: const GLenum DRAW_BUFFER10_WEBGL = 0x882F; michael@0: const GLenum DRAW_BUFFER11_WEBGL = 0x8830; michael@0: const GLenum DRAW_BUFFER12_WEBGL = 0x8831; michael@0: const GLenum DRAW_BUFFER13_WEBGL = 0x8832; michael@0: const GLenum DRAW_BUFFER14_WEBGL = 0x8833; michael@0: const GLenum DRAW_BUFFER15_WEBGL = 0x8834; michael@0: michael@0: const GLenum MAX_COLOR_ATTACHMENTS_WEBGL = 0x8CDF; michael@0: const GLenum MAX_DRAW_BUFFERS_WEBGL = 0x8824; michael@0: michael@0: void drawBuffersWEBGL(sequence buffers); michael@0: }; michael@0: michael@0: [NoInterfaceObject] michael@0: interface WebGLExtensionTextureFloatLinear michael@0: { michael@0: }; michael@0: michael@0: [NoInterfaceObject] michael@0: interface WebGLExtensionTextureHalfFloat michael@0: { michael@0: const GLenum HALF_FLOAT_OES = 0x8D61; michael@0: }; michael@0: michael@0: [NoInterfaceObject] michael@0: interface WebGLExtensionTextureHalfFloatLinear michael@0: { michael@0: }; michael@0: michael@0: [NoInterfaceObject] michael@0: interface WebGLExtensionColorBufferFloat michael@0: { michael@0: const GLenum RGBA32F_EXT = 0x8814; michael@0: const GLenum RGB32F_EXT = 0x8815; michael@0: const GLenum FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE_EXT = 0x8211; michael@0: const GLenum UNSIGNED_NORMALIZED_EXT = 0x8C17; michael@0: }; michael@0: michael@0: [NoInterfaceObject] michael@0: interface WebGLExtensionColorBufferHalfFloat michael@0: { michael@0: const GLenum RGBA16F_EXT = 0x881A; michael@0: const GLenum RGB16F_EXT = 0x881B; michael@0: const GLenum FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE_EXT = 0x8211; michael@0: const GLenum UNSIGNED_NORMALIZED_EXT = 0x8C17; michael@0: }; michael@0: michael@0: [NoInterfaceObject] michael@0: interface WebGLExtensionVertexArray { michael@0: const GLenum VERTEX_ARRAY_BINDING_OES = 0x85B5; michael@0: michael@0: WebGLVertexArray? createVertexArrayOES(); michael@0: void deleteVertexArrayOES(WebGLVertexArray? arrayObject); michael@0: [WebGLHandlesContextLoss] GLboolean isVertexArrayOES(WebGLVertexArray? arrayObject); michael@0: void bindVertexArrayOES(WebGLVertexArray? arrayObject); michael@0: }; michael@0: michael@0: [NoInterfaceObject] michael@0: interface WebGLExtensionInstancedArrays { michael@0: const GLenum VERTEX_ATTRIB_ARRAY_DIVISOR_ANGLE = 0x88FE; michael@0: michael@0: void drawArraysInstancedANGLE(GLenum mode, GLint first, GLsizei count, GLsizei primcount); michael@0: void drawElementsInstancedANGLE(GLenum mode, GLsizei count, GLenum type, GLintptr offset, GLsizei primcount); michael@0: void vertexAttribDivisorANGLE(GLuint index, GLuint divisor); michael@0: };