diff options
author | Alon Zakai <alonzakai@gmail.com> | 2014-06-20 15:19:43 -0700 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2014-06-20 15:19:43 -0700 |
commit | 5f777e08f2affe3e640edf0be757ccfae13cba99 (patch) | |
tree | 4e7eca481c2d87eb9b94ff826800ab1e3c630b76 | |
parent | 910843fccba8c4aae3f4b457e1650b294b213f5b (diff) |
handle ACTIVE_ATTRIBUTES
-rw-r--r-- | src/webGLWorker.js | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/webGLWorker.js b/src/webGLWorker.js index d6d1404e..1a051bbd 100644 --- a/src/webGLWorker.js +++ b/src/webGLWorker.js @@ -600,15 +600,15 @@ function WebGLWorker() { program.uniforms = {}; program.uniformVec = []; - program.existingAttributes = {}; + var existingAttributes = {}; program.shaders.forEach(function(shader) { parseElementType(shader, 'uniform', program.uniforms, program.uniformVec); - parseElementType(shader, 'attribute', program.existingAttributes, null); + parseElementType(shader, 'attribute', existingAttributes, null); }); // bind not-yet bound attributes - for (var attr in program.existingAttributes) { + for (var attr in existingAttributes) { if (!(attr in program.attributes)) { var index = program.attributeVec.length; this.bindAttribLocation(program, index, attr); @@ -620,6 +620,7 @@ function WebGLWorker() { this.getProgramParameter = function(program, name) { switch (name) { case this.ACTIVE_UNIFORMS: return program.uniformVec.length; + case this.ACTIVE_ATTRIBUTES: return program.attributeVec.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', 2, program.id, name); |