aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2014-06-18 14:28:58 -0700
committerAlon Zakai <alonzakai@gmail.com>2014-06-18 14:28:58 -0700
commit27076a2fc9914314cfe40923cb84ad87f47a9d3e (patch)
tree3760ddd8603e81471354f2770a2cfdc0f9cd37ea /src
parent6e0de86d972b7485dd24df2679e00490be19860a (diff)
proxy some renderbuffer stuff
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;