commit 3f9cbd09fe5b51ba72edaa60565847991850cd27
parent e44818a9e6b38882a2f87baa4f2a4f12e15b5000
Author: Amin Mesbah <dev@aminmesbah.com>
Date: Sun, 23 Jun 2019 13:49:03 -0700
Fix contrarotation
The matrix pulled from the valueptr needs to be transposed in webgl.
Diffstat:
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/js/imports.js b/js/imports.js
@@ -134,7 +134,7 @@ imports["webglUniform3f"] = function(location_id, x, y, z) {
imports["webglUniformMatrix4fv"] = function(location_id, data) {
let loc = gl_id_map[location_id];
let dataslice = memory.slice(data, data + 4 * 16);
- gl.uniformMatrix4fv(loc, false, new Float32Array(dataslice.buffer));
+ gl.uniformMatrix4fv(loc, true, new Float32Array(dataslice.buffer));
}
imports["webglUseProgram"] = function(program_id) {
let program = gl_id_map[program_id];