diff options
Diffstat (limited to 'src/webGLWorker.js')
-rw-r--r-- | src/webGLWorker.js | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/webGLWorker.js b/src/webGLWorker.js index c0efcbc9..08b72e01 100644 --- a/src/webGLWorker.js +++ b/src/webGLWorker.js @@ -10,6 +10,8 @@ function WebGLWorker() { var commandBuffer = []; + var nextId = 1; + //=========== // Constants //=========== @@ -480,9 +482,16 @@ function WebGLWorker() { this.disable = function(cap) { commandBuffer.push('disable', 1, cap); }; + this.clear = function(mask) { + commandBuffer.push('clear', 1, mask); + }; this.clearColor = function(r, g, b, a) { commandBuffer.push('clearColor', 4, r, g, b, a); }; + this.createShader = function(type) { + commandBuffer.push('createShader', 1, type); + return { id: nextId++, what: 'shader', type: type }; + } // Setup var postMainLoop = Module['postMainLoop']; |