diff options
author | Alon Zakai <alonzakai@gmail.com> | 2014-06-20 15:04:29 -0700 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2014-06-20 15:04:29 -0700 |
commit | 910843fccba8c4aae3f4b457e1650b294b213f5b (patch) | |
tree | 27d102372c0a34648d4ddc67a37635e4b4f48c9f | |
parent | 7021db66f57cbb6007ad9d62850d2d03bdf83df2 (diff) |
debugPrint option for gl proxying
-rw-r--r-- | src/webGLClient.js | 2 | ||||
-rw-r--r-- | src/webGLWorker.js | 3 |
2 files changed, 5 insertions, 0 deletions
diff --git a/src/webGLClient.js b/src/webGLClient.js index 266d7cfe..f8b51ecc 100644 --- a/src/webGLClient.js +++ b/src/webGLClient.js @@ -67,6 +67,8 @@ function WebGLClient() { //dump('issue+: ' + command + '(' + args + '), ' + numArgs + '\n'); if (command === 'getShaderParameter' || command === 'getProgramParameter') { assert(ctx[command](args[0], args[1]), 'we cannot handle errors, we are async proxied WebGL'); + //} else if (command === 'debugPrint') { + // dump(args[0] + '\n'); } else { ctx[command].apply(ctx, args); } diff --git a/src/webGLWorker.js b/src/webGLWorker.js index 4c221be0..d6d1404e 100644 --- a/src/webGLWorker.js +++ b/src/webGLWorker.js @@ -844,6 +844,9 @@ function WebGLWorker() { this.framebufferRenderbuffer = function(target, attachment, renderbuffertarget, renderbuffer) { commandBuffer.push('framebufferRenderbuffer', 4, target, attachment, renderbuffertarget, renderbuffer ? renderbuffer.id : 0); }; + //this.debugPrint = function(text) { // useful to interleave debug output properly with client GL commands + // commandBuffer.push('debugPrint', 1, text); + //}; // Setup var dropped = 0; |