diff options
author | Alon Zakai <alonzakai@gmail.com> | 2014-06-06 16:11:18 -0700 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2014-06-06 16:11:18 -0700 |
commit | 8aee2b822c689902d9a627393252eea117ac7969 (patch) | |
tree | 974113ae0cbd42510104b4850d4393af82c75dd0 /src | |
parent | f663e4fb30bad72783d5059f1efcd70b83846979 (diff) |
enable, disable, clearcolor
Diffstat (limited to 'src')
-rw-r--r-- | src/webGLWorker.js | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/webGLWorker.js b/src/webGLWorker.js index 582016f7..c0efcbc9 100644 --- a/src/webGLWorker.js +++ b/src/webGLWorker.js @@ -465,17 +465,24 @@ function WebGLWorker() { if (name in this.prefetchedParameters) return this.prefetchedParameters[name]; throw 'TODO: get parameter ' + name + ' : ' + revname(name); }; - this.getExtension = function(name) { var i = this.prefetchedExtensions.indexOf(name); if (i < 0) return null; commandBuffer.push('getExtension', 1, name); return true; // TODO: return an object here }; - this.getSupportedExtensions = function() { return this.prefetchedExtensions; }; + this.enable = function(cap) { + commandBuffer.push('enable', 1, cap); + }; + this.disable = function(cap) { + commandBuffer.push('disable', 1, cap); + }; + this.clearColor = function(r, g, b, a) { + commandBuffer.push('clearColor', 4, r, g, b, a); + }; // Setup var postMainLoop = Module['postMainLoop']; |