diff options
author | Alon Zakai <alonzakai@gmail.com> | 2014-06-18 14:06:57 -0700 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2014-06-18 14:06:57 -0700 |
commit | 0317628c43d8cba131014cdbd6665e2ac29201c1 (patch) | |
tree | f3c2617226b402355dd354c2c84b8589d013b076 /src/webGLWorker.js | |
parent | a7200c57105f4b9bdc354b91019a70260223b096 (diff) |
handle (ignore) null locations in uniform[XY]
Diffstat (limited to 'src/webGLWorker.js')
-rw-r--r-- | src/webGLWorker.js | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/webGLWorker.js b/src/webGLWorker.js index ae104680..5d23ffc7 100644 --- a/src/webGLWorker.js +++ b/src/webGLWorker.js @@ -650,15 +650,19 @@ function WebGLWorker() { commandBuffer.push('useProgram', 1, program ? program.id : 0); }; this.uniform1i = function(location, data) { + if (!location) return; commandBuffer.push('uniform1i', 2, location.id, data); }; this.uniform1f = function(location, data) { + if (!location) return; commandBuffer.push('uniform1f', 2, location.id, data); }; this.uniform4fv = function(location, data) { + if (!location) return; commandBuffer.push('uniform4fv', 2, location.id, new Float32Array(data)); }; this.uniformMatrix4fv = function(location, transpose, data) { + if (!location) return; commandBuffer.push('uniformMatrix4fv', 3, location.id, transpose, new Float32Array(data)); }; this.vertexAttrib4fv = function(index, values) { |