summaryrefslogtreecommitdiff
path: root/src/webGLClient.js
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2014-06-06 16:00:14 -0700
committerAlon Zakai <alonzakai@gmail.com>2014-06-06 16:00:14 -0700
commitcec906c9c27fba775270e62aa3359489fe452c56 (patch)
tree171d122fc7148583d89738fb548451964ed657a9 /src/webGLClient.js
parente1055ada578f6218b5c16104ea554cc74c831959 (diff)
prepare to proxy gl commands
Diffstat (limited to 'src/webGLClient.js')
-rw-r--r--src/webGLClient.js13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/webGLClient.js b/src/webGLClient.js
index 5a69c4a4..02756ddb 100644
--- a/src/webGLClient.js
+++ b/src/webGLClient.js
@@ -1,6 +1,19 @@
// WebGLWorker client code
function WebGLClient() {
+ function renderCommands(buffer) {
+ }
+
+ this.onmessage = function(msg) {
+ dump('client GL got ' + JSON.stringify(msg) + '\n');
+ switch(msg.op) {
+ case 'render': {
+ renderCommands(msg.commandBuffer);
+ break;
+ }
+ default: throw 'weird gl onmessage ' + JSON.stringify(msg);
+ }
+ };
}
WebGLClient.prefetch = function() {