diff options
-rw-r--r-- | src/webGLClient.js | 1 | ||||
-rw-r--r-- | src/webGLWorker.js | 8 |
2 files changed, 9 insertions, 0 deletions
diff --git a/src/webGLClient.js b/src/webGLClient.js index b0adb478..2028d1dc 100644 --- a/src/webGLClient.js +++ b/src/webGLClient.js @@ -13,6 +13,7 @@ function WebGLClient() { case 'compileShader': case 'shaderSource': args[0] = objects[args[0]]; break; case 'attachShader': args[0] = objects[args[0]]; args[1] = objects[args[1]]; break; + case 'bindBuffer': args[1] = objects[args[1]]; break; } } diff --git a/src/webGLWorker.js b/src/webGLWorker.js index 88327cf9..39ee97e5 100644 --- a/src/webGLWorker.js +++ b/src/webGLWorker.js @@ -573,6 +573,14 @@ function WebGLWorker() { this.uniform4fv = function(location, data) { commandBuffer.push('uniform4fv', 2, location.id, data); }; + this.createBuffer = function() { + var id = nextId++; + commandBuffer.push('createBuffer', -1, id); + return { what: 'buffer', id: id }; + }; + this.bindBuffer = function(target, buffer) { + commandBuffer.push('bindBuffer', target, buffer.id); + }; // Setup var postMainLoop = Module['postMainLoop']; |