diff options
Diffstat (limited to 'src/webGLWorker.js')
-rw-r--r-- | src/webGLWorker.js | 7 |
1 files changed, 6 insertions, 1 deletions
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']; |