diff --git a/dom/canvas/WebGL2Context.h b/dom/canvas/WebGL2Context.h index cb2c09eb5c9a..22936bd7ffd2 100644 --- a/dom/canvas/WebGL2Context.h +++ b/dom/canvas/WebGL2Context.h @@ -122,16 +122,32 @@ private: public: void Uniform1uiv(WebGLUniformLocation* loc, const dom::Sequence& arr) { - Uniform1uiv_base(loc,arr.Length(), arr.Elements()); + Uniform1uiv_base(loc, arr.Length(), arr.Elements()); } void Uniform2uiv(WebGLUniformLocation* loc, const dom::Sequence& arr) { - Uniform2uiv_base(loc,arr.Length(), arr.Elements()); + Uniform2uiv_base(loc, arr.Length(), arr.Elements()); } void Uniform3uiv(WebGLUniformLocation* loc, const dom::Sequence& arr) { - Uniform3uiv_base(loc,arr.Length(), arr.Elements()); + Uniform3uiv_base(loc, arr.Length(), arr.Elements()); } void Uniform4uiv(WebGLUniformLocation* loc, const dom::Sequence& arr) { - Uniform4uiv_base(loc,arr.Length(), arr.Elements()); + Uniform4uiv_base(loc, arr.Length(), arr.Elements()); + } + void Uniform1uiv(WebGLUniformLocation* loc, const dom::Uint32Array& arr) { + arr.ComputeLengthAndData(); + Uniform1uiv_base(loc, arr.Length(), arr.Data()); + } + void Uniform2uiv(WebGLUniformLocation* loc, const dom::Uint32Array& arr) { + arr.ComputeLengthAndData(); + Uniform2uiv_base(loc, arr.Length(), arr.Data()); + } + void Uniform3uiv(WebGLUniformLocation* loc, const dom::Uint32Array& arr) { + arr.ComputeLengthAndData(); + Uniform3uiv_base(loc, arr.Length(), arr.Data()); + } + void Uniform4uiv(WebGLUniformLocation* loc, const dom::Uint32Array& arr) { + arr.ComputeLengthAndData(); + Uniform4uiv_base(loc, arr.Length(), arr.Data()); } private: diff --git a/dom/webidl/WebGL2RenderingContext.webidl b/dom/webidl/WebGL2RenderingContext.webidl index 93719a627a51..417133877ec2 100644 --- a/dom/webidl/WebGL2RenderingContext.webidl +++ b/dom/webidl/WebGL2RenderingContext.webidl @@ -375,9 +375,13 @@ interface WebGL2RenderingContext : WebGLRenderingContext void uniform2ui(WebGLUniformLocation? location, GLuint v0, GLuint v1); void uniform3ui(WebGLUniformLocation? location, GLuint v0, GLuint v1, GLuint v2); void uniform4ui(WebGLUniformLocation? location, GLuint v0, GLuint v1, GLuint v2, GLuint v3); + void uniform1uiv(WebGLUniformLocation? location, Uint32Array value); void uniform1uiv(WebGLUniformLocation? location, sequence value); + void uniform2uiv(WebGLUniformLocation? location, Uint32Array value); void uniform2uiv(WebGLUniformLocation? location, sequence value); + void uniform3uiv(WebGLUniformLocation? location, Uint32Array value); void uniform3uiv(WebGLUniformLocation? location, sequence value); + void uniform4uiv(WebGLUniformLocation? location, Uint32Array value); void uniform4uiv(WebGLUniformLocation? location, sequence value); void uniformMatrix2x3fv(WebGLUniformLocation? location, GLboolean transpose, Float32Array value); void uniformMatrix2x3fv(WebGLUniformLocation? location, GLboolean transpose, sequence value);