aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/webGLClient.js1
-rw-r--r--src/webGLWorker.js14
2 files changed, 15 insertions, 0 deletions
diff --git a/src/webGLClient.js b/src/webGLClient.js
index 348a7465..13acc037 100644
--- a/src/webGLClient.js
+++ b/src/webGLClient.js
@@ -26,6 +26,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 'bindRenderbuffer':
case 'bindFramebuffer':
case 'bindTexture':
case 'bindBuffer': args[1] = args[1] ? objects[args[1]] : null; break;
diff --git a/src/webGLWorker.js b/src/webGLWorker.js
index c7ebc7d6..ae99d19f 100644
--- a/src/webGLWorker.js
+++ b/src/webGLWorker.js
@@ -810,6 +810,20 @@ function WebGLWorker() {
this.checkFramebufferStatus = function(target) {
return this.FRAMEBUFFER_COMPLETE; // XXX totally wrong
};
+ this.createRenderbuffer = function() {
+ var id = nextId++;
+ commandBuffer.push('createRenderbuffer', -1, id);
+ return new WebGLRenderbuffer(id);
+ };
+ this.deleteRenderbuffer = function(renderbuffer) {
+ commandBuffer.push('deleteRenderbuffer', 1, renderbuffer.id);
+ };
+ this.bindRenderbuffer = function(target, renderbuffer) {
+ commandBuffer.push('bindRenderbuffer', 2, target, renderbuffer ? renderbuffer.id : 0);
+ };
+ this.renderbufferStorage = function(target, internalformat, width, height) {
+ commandBuffer.push('renderbufferStorage', 4, target, internalformat, width, height);
+ };
// Setup
var dropped = 0;