aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/webGLClient.js5
-rw-r--r--src/webGLWorker.js11
2 files changed, 11 insertions, 5 deletions
diff --git a/src/webGLClient.js b/src/webGLClient.js
index 1c34f12d..663c693a 100644
--- a/src/webGLClient.js
+++ b/src/webGLClient.js
@@ -9,6 +9,7 @@ function WebGLClient() {
function fixArgs(command, args) {
switch (command) {
+ case 'getProgramParameter':
case 'getShaderParameter':
case 'uniform4fv':
case 'uniformMatrix4fv':
@@ -46,8 +47,8 @@ function WebGLClient() {
var args = fixArgs(command, buffer.slice(i, i+numArgs));
i += numArgs;
//dump('issue+: ' + command + '(' + args + '), ' + numArgs + '\n');
- if (command === 'getShaderParameter') {
- assert(ctx.getShaderParameter(args[0], args[1]), 'we cannot handle errors, we are async proxied WebGL');
+ if (command === 'getShaderParameter' || command === 'getProgramParameter') {
+ assert(ctx[command](args[0], args[1]), 'we cannot handle errors, we are async proxied WebGL');
} else {
ctx[command].apply(ctx, args);
}
diff --git a/src/webGLWorker.js b/src/webGLWorker.js
index 997f79d8..a7731767 100644
--- a/src/webGLWorker.js
+++ b/src/webGLWorker.js
@@ -573,10 +573,15 @@ function WebGLWorker() {
});
};
this.getProgramParameter = function(program, name) {
- if (name === this.ACTIVE_UNIFORMS) {
- return program.uniformVec.length;
+ switch (name) {
+ case this.ACTIVE_UNIFORMS: return program.uniformVec.length;
+ case this.LINK_STATUS: {
+ // optimisticaly return success; client will abort on an actual error. we assume an error-free async workflow
+ commandBuffer.push('getProgramParameter', program.id, name);
+ return true;
+ }
+ default: throw 'bad getProgramParameter ' + revname(name);
}
- throw 'bad getProgramParameter ' + revname(name);
};
this.getActiveUniform = function(program, index) {
var name = program.uniformVec[index];