mirror of
https://github.com/photonstorm/phaser
synced 2024-11-23 05:03:37 +00:00
Get textureUnit even if batch not flushed
This commit is contained in:
parent
1750caca18
commit
97387f36f2
1 changed files with 6 additions and 4 deletions
|
@ -65,6 +65,11 @@ var MeshWebGLRenderer = function (renderer, src, camera, parentMatrix)
|
|||
|
||||
renderer.pipelines.preBatch(src);
|
||||
|
||||
if (!pipeline.currentBatch)
|
||||
{
|
||||
textureUnit = pipeline.setGameObject(src);
|
||||
}
|
||||
|
||||
for (var i = 0; i < totalFaces; i++)
|
||||
{
|
||||
var face = faces[i];
|
||||
|
@ -79,10 +84,7 @@ var MeshWebGLRenderer = function (renderer, src, camera, parentMatrix)
|
|||
{
|
||||
pipeline.flush();
|
||||
|
||||
if (!pipeline.currentBatch)
|
||||
{
|
||||
textureUnit = pipeline.setGameObject(src);
|
||||
}
|
||||
textureUnit = pipeline.setGameObject(src);
|
||||
|
||||
vertexOffset = 0;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue