Skip to content

Commit 3dbfafa

Browse files
authored
Merge pull request #708 from noocsharp/master
Pixi.WebGLSpriteBatch: bind to textureIndex only if it's defined
2 parents 232f857 + cf0622a commit 3dbfafa

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -637,7 +637,10 @@ PIXI.WebGLSpriteBatch.prototype.flush = function ()
637637
gl.vertexAttribPointer(shader.colorAttribute, 4, gl.UNSIGNED_BYTE, true, stride, 16);
638638

639639
// Texture index
640-
gl.vertexAttribPointer(shader.aTextureIndex, 1, gl.FLOAT, false, stride, 20);
640+
if (PIXI._enableMultiTextureToggle)
641+
{
642+
gl.vertexAttribPointer(shader.aTextureIndex, 1, gl.FLOAT, false, stride, 20);
643+
}
641644
}
642645

643646
// upload the verts to the buffer

0 commit comments

Comments
 (0)