webgl: Implement uniformMatrix*fv.

These new functions are derived from the existing uniform*fv
functions.  They get used in a lot of demo code, so it should greatly
improve our compatibility.

This regresses uniformMatrixBadArgs.html, which gets at an existing
problem in our uniform matrix support (failure to validate that the
uniform is a matrix before calling down) but previously just failed
because it only called the 'fv' variants and never the existing 'f'
variants.
This commit is contained in:
Eric Anholt 2016-09-17 19:40:42 +01:00
parent 804317c885
commit 61debe5c01
13 changed files with 262 additions and 94 deletions

View file

@ -713,14 +713,23 @@ interface WebGLRenderingContextBase
// Float32Array value);
//void uniformMatrix2fv(WebGLUniformLocation? location, GLboolean transpose,
// sequence<GLfloat> value);
[Throws]
void uniformMatrix2fv(WebGLUniformLocation? location, GLboolean transpose,
object v);
//void uniformMatrix3fv(WebGLUniformLocation? location, GLboolean transpose,
// Float32Array value);
//void uniformMatrix3fv(WebGLUniformLocation? location, GLboolean transpose,
// sequence<GLfloat> value);
[Throws]
void uniformMatrix3fv(WebGLUniformLocation? location, GLboolean transpose,
object v);
//void uniformMatrix4fv(WebGLUniformLocation? location, GLboolean transpose,
// Float32Array value);
//void uniformMatrix4fv(WebGLUniformLocation? location, GLboolean transpose,
// sequence<GLfloat> value);
[Throws]
void uniformMatrix4fv(WebGLUniformLocation? location, GLboolean transpose,
object v);
void useProgram(WebGLProgram? program);
void validateProgram(WebGLProgram? program);