diff options
-rw-r--r-- | src/webGLClient.js | 2 | ||||
-rw-r--r-- | src/webGLWorker.js | 7 |
2 files changed, 8 insertions, 1 deletions
diff --git a/src/webGLClient.js b/src/webGLClient.js index 45a7486a..b0adb478 100644 --- a/src/webGLClient.js +++ b/src/webGLClient.js @@ -5,6 +5,8 @@ function WebGLClient() { function fixArgs(command, args) { switch (command) { + case 'uniform4fv': + case 'getUniformLocation': case 'useProgram': case 'linkProgram': case 'bindAttribLocation': diff --git a/src/webGLWorker.js b/src/webGLWorker.js index 0282d83d..d0f70781 100644 --- a/src/webGLWorker.js +++ b/src/webGLWorker.js @@ -558,7 +558,9 @@ function WebGLWorker() { index = parseInt(name.substring(open+1, close)); name = name.substr(0, open); } - return { what: 'location', uniform: program.uniforms[name], index: index }; + var id = nextId++; + commandBuffer.push('getUniformLocation', -3, program.id, name, id); + return { what: 'location', uniform: program.uniforms[name], id: id, index: index }; }; this.getProgramInfoLog = function(shader) { return ''; // optimistic assumption of success; no proxying @@ -566,6 +568,9 @@ function WebGLWorker() { this.useProgram = function(program) { commandBuffer.push('useProgram', 1, program.id); }; + this.uniform4fv = function(location, data) { + commandBuffer.push('uniform4fv', 2, location.id, data); + }; // Setup var postMainLoop = Module['postMainLoop']; |