aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2014-06-17 13:10:24 -0700
committerAlon Zakai <alonzakai@gmail.com>2014-06-17 13:10:24 -0700
commit58963c32a4231a501af127bb614707c759714462 (patch)
tree70c6d7927beec18bc0691efc213955e914093fef /src
parentdf9d3c2381883d38efd870a1d62730a6b16e1a8b (diff)
return -1 from getAttribLocation when queried on nonexisting attributes
Diffstat (limited to 'src')
-rw-r--r--src/webGLWorker.js1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/webGLWorker.js b/src/webGLWorker.js
index cbf5ec74..6416add9 100644
--- a/src/webGLWorker.js
+++ b/src/webGLWorker.js
@@ -559,6 +559,7 @@ function WebGLWorker() {
this.getAttribLocation = function(program, name) {
// manually bound attribs are cached locally
if (name in program.attributes) return program.attributes[name];
+ if (!(name in program.existingAttributes)) return -1;
// if not manually bound, bind it to the next index so we update the client
var index = program.attributeVec.length;
this.bindAttribLocation(program, index, name);