Upgrade gfx.js to 1.3.1 (#2985)

This commit is contained in:
pandamicro
2018-07-16 17:45:12 +08:00
committed by GitHub
parent 6f4af02231
commit 0cfb3f3e31
+1 -1
View File
@@ -9431,7 +9431,7 @@ function _commitTextures(gl, cur, next) {
for (var i = 0; i < next.maxTextureSlot + 1; ++i) {
if (cur.textureUnits[i] !== next.textureUnits[i]) {
var texture = next.textureUnits[i];
if (texture !== undefined && texture._glID !== -1) {
if (texture && texture._glID !== -1) {
gl.activeTexture(gl.TEXTURE0 + i);
gl.bindTexture(texture._target, texture._glID);
}