diff options
author | Alon Zakai <alonzakai@gmail.com> | 2014-06-09 16:24:13 -0700 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2014-06-09 16:24:13 -0700 |
commit | baf91b75b1e9a775b4cbc77daaf7c4e12a1a7f46 (patch) | |
tree | ff48b8b3db3aa48aae31e53e0268e518f050c2a8 /src/webGLWorker.js | |
parent | a091408336198a95858e31a2b90f363765338ef1 (diff) |
createBuffer, bindBuffer
Diffstat (limited to 'src/webGLWorker.js')
-rw-r--r-- | src/webGLWorker.js | 8 |
1 files changed, 8 insertions, 0 deletions
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']; |