Skip to content

Commit c37c69e

Browse files
committed
fix on settexture2D
1 parent c40e94f commit c37c69e

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

v3/src/renderer/webgl/WebGLRenderer.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,11 @@ WebGLRenderer.prototype = {
152152
{
153153
if (this.currentTexture2D != texture2D)
154154
{
155-
this.flush();
155+
var batch = this.batch;
156+
if (batch)
157+
{
158+
batch.flush();
159+
}
156160
gl.activeTexture(gl.TEXTURE0);
157161
gl.bindTexture(gl.TEXTURE_2D, texture2D);
158162
this.currentTexture2D = texture2D;

0 commit comments

Comments
 (0)