dom/webidl/WebGL2RenderingContext.webidl

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/dom/webidl/WebGL2RenderingContext.webidl	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,131 @@
     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 + * This IDL depends on WebGLRenderingContext.webidl
    1.10 + */
    1.11 +
    1.12 +[Pref="webgl.enable-prototype-webgl2"]
    1.13 +interface WebGLQuery {
    1.14 +};
    1.15 +
    1.16 +[Pref="webgl.enable-prototype-webgl2"]
    1.17 +interface WebGL2RenderingContext : WebGLRenderingContext {
    1.18 +
    1.19 +    /* depth textures */
    1.20 +    const GLenum UNSIGNED_INT_24_8                           = 0x84FA;
    1.21 +
    1.22 +
    1.23 +    /* draw buffers */
    1.24 +    const GLenum COLOR_ATTACHMENT1                           = 0x8CE1;
    1.25 +    const GLenum COLOR_ATTACHMENT2                           = 0x8CE2;
    1.26 +    const GLenum COLOR_ATTACHMENT3                           = 0x8CE3;
    1.27 +    const GLenum COLOR_ATTACHMENT4                           = 0x8CE4;
    1.28 +    const GLenum COLOR_ATTACHMENT5                           = 0x8CE5;
    1.29 +    const GLenum COLOR_ATTACHMENT6                           = 0x8CE6;
    1.30 +    const GLenum COLOR_ATTACHMENT7                           = 0x8CE7;
    1.31 +    const GLenum COLOR_ATTACHMENT8                           = 0x8CE8;
    1.32 +    const GLenum COLOR_ATTACHMENT9                           = 0x8CE9;
    1.33 +    const GLenum COLOR_ATTACHMENT10                          = 0x8CEA;
    1.34 +    const GLenum COLOR_ATTACHMENT11                          = 0x8CEB;
    1.35 +    const GLenum COLOR_ATTACHMENT12                          = 0x8CEC;
    1.36 +    const GLenum COLOR_ATTACHMENT13                          = 0x8CED;
    1.37 +    const GLenum COLOR_ATTACHMENT14                          = 0x8CEE;
    1.38 +    const GLenum COLOR_ATTACHMENT15                          = 0x8CEF;
    1.39 +
    1.40 +    const GLenum DRAW_BUFFER0                                = 0x8825;
    1.41 +    const GLenum DRAW_BUFFER1                                = 0x8826;
    1.42 +    const GLenum DRAW_BUFFER2                                = 0x8827;
    1.43 +    const GLenum DRAW_BUFFER3                                = 0x8828;
    1.44 +    const GLenum DRAW_BUFFER4                                = 0x8829;
    1.45 +    const GLenum DRAW_BUFFER5                                = 0x882A;
    1.46 +    const GLenum DRAW_BUFFER6                                = 0x882B;
    1.47 +    const GLenum DRAW_BUFFER7                                = 0x882C;
    1.48 +    const GLenum DRAW_BUFFER8                                = 0x882D;
    1.49 +    const GLenum DRAW_BUFFER9                                = 0x882E;
    1.50 +    const GLenum DRAW_BUFFER10                               = 0x882F;
    1.51 +    const GLenum DRAW_BUFFER11                               = 0x8830;
    1.52 +    const GLenum DRAW_BUFFER12                               = 0x8831;
    1.53 +    const GLenum DRAW_BUFFER13                               = 0x8832;
    1.54 +    const GLenum DRAW_BUFFER14                               = 0x8833;
    1.55 +    const GLenum DRAW_BUFFER15                               = 0x8834;
    1.56 +
    1.57 +    const GLenum MAX_COLOR_ATTACHMENTS                       = 0x8CDF;
    1.58 +    const GLenum MAX_DRAW_BUFFERS                            = 0x8824;
    1.59 +
    1.60 +    void drawBuffers(sequence<GLenum> buffers);
    1.61 +
    1.62 +
    1.63 +    /* draw instanced */
    1.64 +    void drawArraysInstanced(GLenum mode, GLint first, GLsizei count, GLsizei primcount);
    1.65 +    void drawElementsInstanced(GLenum mode, GLsizei count, GLenum type, GLintptr offset, GLsizei primcount);
    1.66 +
    1.67 +
    1.68 +    /* instanced array */
    1.69 +    const GLenum VERTEX_ATTRIB_ARRAY_DIVISOR                 = 0x88FE;
    1.70 +
    1.71 +    void vertexAttribDivisor(GLuint index, GLuint divisor);
    1.72 +
    1.73 +
    1.74 +    /* blend equations */
    1.75 +    const GLenum MIN                                         = 0x8007;
    1.76 +    const GLenum MAX                                         = 0x8008;
    1.77 +
    1.78 +
    1.79 +    /* transform feedback */
    1.80 +    const GLenum RASTERIZER_DISCARD                          = 0x8C89;
    1.81 +    const GLenum TRANSFORM_FEEDBACK_BUFFER                   = 0x8C8E;
    1.82 +    const GLenum TRANSFORM_FEEDBACK_BUFFER_BINDING           = 0x8C8F;
    1.83 +    const GLenum TRANSFORM_FEEDBACK_BUFFER_START             = 0x8C84;
    1.84 +    const GLenum TRANSFORM_FEEDBACK_BUFFER_SIZE              = 0x8C85;
    1.85 +    const GLenum MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS     = 0x8C8B;
    1.86 +
    1.87 +
    1.88 +    /* query objects */
    1.89 +    const GLenum CURRENT_QUERY                               = 0x8865;
    1.90 +    const GLenum QUERY_RESULT                                = 0x8866;
    1.91 +    const GLenum QUERY_RESULT_AVAILABLE                      = 0x8867;
    1.92 +
    1.93 +    void beginQuery(GLenum target, WebGLQuery? queryObject);
    1.94 +    WebGLQuery? createQuery();
    1.95 +    void deleteQuery(WebGLQuery? queryObject);
    1.96 +    void endQuery(GLenum target);
    1.97 +    WebGLQuery? getQuery(GLenum target, GLenum pname);
    1.98 +    any getQueryObject(WebGLQuery? queryObject, GLenum pname);
    1.99 +    [WebGLHandlesContextLoss] GLboolean isQuery(WebGLQuery? queryObject);
   1.100 +
   1.101 +
   1.102 +    /* occlusion queries */
   1.103 +    const GLenum ANY_SAMPLES_PASSED                          = 0x8C2F;
   1.104 +    const GLenum ANY_SAMPLES_PASSED_CONSERVATIVE             = 0x8D6A;
   1.105 +
   1.106 +
   1.107 +    /* transform feedback queries */
   1.108 +    const GLenum TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN       = 0x8C88;
   1.109 +
   1.110 +
   1.111 +    /* buffer objects */
   1.112 +    void bindBufferBase(GLenum target, GLuint index, WebGLBuffer? buffer);
   1.113 +    void bindBufferRange(GLenum target, GLuint index, WebGLBuffer? buffer,
   1.114 +                         GLintptr offset, GLsizeiptr size);
   1.115 +
   1.116 +
   1.117 +    /* standart derivatives */
   1.118 +    const GLenum FRAGMENT_SHADER_DERIVATIVE_HINT             = 0x8B8B;
   1.119 +
   1.120 +
   1.121 +    /* state requests */
   1.122 +    any getParameterIndexed(GLenum pname, GLuint index);
   1.123 +
   1.124 +
   1.125 +    /* vertex array objects */
   1.126 +    const GLenum VERTEX_ARRAY_BINDING                        = 0x85B5;
   1.127 +
   1.128 +    void bindVertexArray(WebGLVertexArray? arrayObject);
   1.129 +    WebGLVertexArray? createVertexArray();
   1.130 +    void deleteVertexArray(WebGLVertexArray? arrayObject);
   1.131 +    [WebGLHandlesContextLoss] GLboolean isVertexArray(WebGLVertexArray? arrayObject);
   1.132 +
   1.133 +};
   1.134 +

mercurial