[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Public WebGL] WebIDL cleanup



(Boris: does this look right to you?)

The following methods:

    void bufferData(GLenum target, GLsizeiptr size, GLenum usage);
    void bufferData(GLenum target, ArrayBufferView data, GLenum usage);
    void bufferData(GLenum target, ArrayBuffer? data, GLenum usage);
    void bufferSubData(GLenum target, GLintptr offset, ArrayBufferView data);
    void bufferSubData(GLenum target, GLintptr offset, ArrayBuffer? data);
    void texImage2D(GLenum target, GLint level, GLenum internalformat,
                    GLenum format, GLenum type, ImageData? pixels);
    void texImage2D(GLenum target, GLint level, GLenum internalformat,
                    GLenum format, GLenum type, HTMLImageElement image);
    void texImage2D(GLenum target, GLint level, GLenum internalformat,
                    GLenum format, GLenum type, HTMLCanvasElement canvas);
    void texImage2D(GLenum target, GLint level, GLenum internalformat,
                    GLenum format, GLenum type, HTMLVideoElement video);
    void texSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, 
                       GLenum format, GLenum type, ImageData? pixels);
    void texSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, 
                       GLenum format, GLenum type, HTMLImageElement image);
    void texSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, 
                       GLenum format, GLenum type, HTMLCanvasElement canvas);
    void texSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, 
                       GLenum format, GLenum type, HTMLVideoElement video);
    void uniform1fv(WebGLUniformLocation? location, Float32Array v);
    void uniform1fv(WebGLUniformLocation? location, sequence<float> v);
    void uniform1iv(WebGLUniformLocation? location, Int32Array v);
    void uniform1iv(WebGLUniformLocation? location, sequence<long> v);
    void uniform2fv(WebGLUniformLocation? location, Float32Array v);
    void uniform2fv(WebGLUniformLocation? location, sequence<float> v);
    void uniform2iv(WebGLUniformLocation? location, Int32Array v);
    void uniform2iv(WebGLUniformLocation? location, sequence<long> v);
    void uniform3fv(WebGLUniformLocation? location, Float32Array v);
    void uniform3fv(WebGLUniformLocation? location, sequence<float> v);
    void uniform3iv(WebGLUniformLocation? location, Int32Array v);
    void uniform3iv(WebGLUniformLocation? location, sequence<long> v);
    void uniform4fv(WebGLUniformLocation? location, Float32Array v);
    void uniform4fv(WebGLUniformLocation? location, sequence<float> v);
    void uniform4iv(WebGLUniformLocation? location, Int32Array v);
    void uniform4iv(WebGLUniformLocation? location, sequence<long> v);
    void uniformMatrix2fv(WebGLUniformLocation? location, GLboolean transpose, Float32Array value);
    void uniformMatrix2fv(WebGLUniformLocation? location, GLboolean transpose, sequence<float> value);
    void uniformMatrix3fv(WebGLUniformLocation? location, GLboolean transpose, Float32Array value);
    void uniformMatrix3fv(WebGLUniformLocation? location, GLboolean transpose, sequence<float> value);
    void uniformMatrix4fv(WebGLUniformLocation? location, GLboolean transpose, Float32Array value);
    void uniformMatrix4fv(WebGLUniformLocation? location, GLboolean transpose, sequence<float> value);
    void vertexAttrib1fv(GLuint indx, Float32Array values);
    void vertexAttrib1fv(GLuint indx, sequence<float> values);
    void vertexAttrib2fv(GLuint indx, Float32Array values);
    void vertexAttrib2fv(GLuint indx, sequence<float> values);
    void vertexAttrib3fv(GLuint indx, Float32Array values);
    void vertexAttrib3fv(GLuint indx, sequence<float> values);
    void vertexAttrib4fv(GLuint indx, Float32Array values);
    void vertexAttrib4fv(GLuint indx, sequence<float> values);

can be simplified to the following:

    void bufferData(GLenum target, GLsizeiptr or ArrayBufferView  or ArrayBuffer? size, GLenum usage);
    void bufferSubData(GLenum target, GLintptr offset, ArrayBufferView or ArrayBuffer? data);
    void texImage2D(GLenum target, GLint level, GLenum internalformat, GLenum format, GLenum type,
                     ImageData? or HTMLImageElement  or HTMLCanvasElement or HTMLVideoElement image);
    void texSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLenum format, GLenum type,
                     ImageData? or HTMLImageElement  or HTMLCanvasElement or HTMLVideoElement image);
    void uniform1fv(WebGLUniformLocation? location, Float32Array or sequence<float> v);
    void uniform1iv(WebGLUniformLocation? location, Int32Array or sequence<long> v);
    void uniform2fv(WebGLUniformLocation? location, Float32Array or sequence<float> v);
    void uniform2iv(WebGLUniformLocation? location, Int32Array or sequence<long> v);
    void uniform3fv(WebGLUniformLocation? location, Float32Array or sequence<float> v);
    void uniform3iv(WebGLUniformLocation? location, Int32Array or sequence<long> v);
    void uniform4fv(WebGLUniformLocation? location, Float32Array or sequence<float> v);
    void uniform4iv(WebGLUniformLocation? location, Int32Array or sequence<long> v);
    void uniformMatrix2fv(WebGLUniformLocation? location, GLboolean transpose, Float32Array or sequence<float>  value);
    void uniformMatrix3fv(WebGLUniformLocation? location, GLboolean transpose, Float32Array or sequence<float> value);
    void uniformMatrix4fv(WebGLUniformLocation? location, GLboolean transpose, Float32Array or sequence<float> value);
    void vertexAttrib1fv(GLuint indx, Float32Array or sequence<float> values);
    void vertexAttrib2fv(GLuint indx, Float32Array or sequence<float> values);
    void vertexAttrib3fv(GLuint indx, Float32Array or sequence<float> values);
    void vertexAttrib4fv(GLuint indx, Float32Array or sequence<float> values);

--
Glenn Maynard