aboutsummaryrefslogtreecommitdiff
path: root/src/webGLWorker.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/webGLWorker.js')
-rw-r--r--src/webGLWorker.js8
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'];