Bug 1048745 - Uniform array with Uint32Array. r=jgilbert, r=smaug

This commit is contained in:
Dan Glastonbury 2015-03-23 11:21:17 +10:00
parent b5404f62e0
commit c9f30719f5
2 changed files with 24 additions and 4 deletions

View File

@ -122,16 +122,32 @@ private:
public:
void Uniform1uiv(WebGLUniformLocation* loc, const dom::Sequence<GLuint>& arr) {
Uniform1uiv_base(loc,arr.Length(), arr.Elements());
Uniform1uiv_base(loc, arr.Length(), arr.Elements());
}
void Uniform2uiv(WebGLUniformLocation* loc, const dom::Sequence<GLuint>& arr) {
Uniform2uiv_base(loc,arr.Length(), arr.Elements());
Uniform2uiv_base(loc, arr.Length(), arr.Elements());
}
void Uniform3uiv(WebGLUniformLocation* loc, const dom::Sequence<GLuint>& arr) {
Uniform3uiv_base(loc,arr.Length(), arr.Elements());
Uniform3uiv_base(loc, arr.Length(), arr.Elements());
}
void Uniform4uiv(WebGLUniformLocation* loc, const dom::Sequence<GLuint>& 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:

View File

@ -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<GLuint> value);
void uniform2uiv(WebGLUniformLocation? location, Uint32Array value);
void uniform2uiv(WebGLUniformLocation? location, sequence<GLuint> value);
void uniform3uiv(WebGLUniformLocation? location, Uint32Array value);
void uniform3uiv(WebGLUniformLocation? location, sequence<GLuint> value);
void uniform4uiv(WebGLUniformLocation? location, Uint32Array value);
void uniform4uiv(WebGLUniformLocation? location, sequence<GLuint> value);
void uniformMatrix2x3fv(WebGLUniformLocation? location, GLboolean transpose, Float32Array value);
void uniformMatrix2x3fv(WebGLUniformLocation? location, GLboolean transpose, sequence<GLfloat> value);