diff options
-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 8604f82e..965e76b8 100644 --- a/src/webGLWorker.js +++ b/src/webGLWorker.js @@ -40,7 +40,8 @@ function WebGLWorker() { var bindings = { texture2D: null, arrayBuffer: null, - elementArrayBuffer: null + elementArrayBuffer: null, + program: null }; //=========== @@ -506,6 +507,9 @@ function WebGLWorker() { case this.ELEMENT_ARRAY_BUFFER_BINDING: { return bindings.elementArrayBuffer; } + case this.CURRENT_PROGRAM: { + return bindings.program; + } default: throw 'TODO: get parameter ' + name + ' : ' + revname(name); } }; @@ -648,6 +652,7 @@ function WebGLWorker() { }; this.useProgram = function(program) { commandBuffer.push('useProgram', 1, program ? program.id : 0); + bindings.program = program; }; this.uniform1i = function(location, data) { if (!location) return; |