summaryrefslogtreecommitdiff
path: root/src/webGLClient.js
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2014-06-06 16:07:39 -0700
committerAlon Zakai <alonzakai@gmail.com>2014-06-06 16:07:39 -0700
commitf663e4fb30bad72783d5059f1efcd70b83846979 (patch)
treefe89eda86528fb71915c61e7f93ca898b3b8cee2 /src/webGLClient.js
parentcec906c9c27fba775270e62aa3359489fe452c56 (diff)
proxy getExtension
Diffstat (limited to 'src/webGLClient.js')
-rw-r--r--src/webGLClient.js10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/webGLClient.js b/src/webGLClient.js
index 02756ddb..a0cc7b7d 100644
--- a/src/webGLClient.js
+++ b/src/webGLClient.js
@@ -2,6 +2,16 @@
function WebGLClient() {
function renderCommands(buffer) {
+ var ctx = Module.ctx;
+ var i = 0;
+ var len = buffer.length;
+ while (i < len) {
+ var command = buffer[i++];
+ var numArgs = buffer[i++];
+ var args = buffer.slice(i, i+numArgs);
+ i += numArgs;
+ ctx[command].apply(ctx, args);
+ }
}
this.onmessage = function(msg) {