BitmapText now reset texture unit on flush

This commit is contained in:
Emil Schnedler Vad 2023-04-19 15:37:17 +02:00
parent 9e4d0ade2b
commit 0d06b87c9e
2 changed files with 12 additions and 0 deletions

View file

@ -267,6 +267,12 @@ var DynamicBitmapTextWebGLRenderer = function (renderer, src, camera, parentMatr
ty3 = Math.round(ty3);
}
if (pipeline.shouldFlush(6))
{
pipeline.flush();
textureUnit = pipeline.setGameObject(src);
}
pipeline.batchQuad(src, tx0, ty0, tx1, ty1, tx2, ty2, tx3, ty3, u0, v0, u1, v1, tintTL, tintTR, tintBL, tintBR, tintEffect, texture, textureUnit);
}

View file

@ -107,6 +107,12 @@ var BitmapTextWebGLRenderer = function (renderer, src, camera, parentMatrix)
continue;
}
if (pipeline.shouldFlush(6))
{
pipeline.flush();
textureUnit = pipeline.setGameObject(src);
}
if (charColors[char.i])
{
var color = charColors[char.i];