mirror of
https://github.com/photonstorm/phaser
synced 2024-11-23 13:13:43 +00:00
Added mesh rendering detection
This commit is contained in:
parent
399e12b2ca
commit
49bcb5829b
1 changed files with 3 additions and 1 deletions
|
@ -46,6 +46,7 @@ var SpriteBatch = function (game, gl, manager)
|
|||
this.dirty = false;
|
||||
this.drawIndexed = true;
|
||||
this.lastDrawIndexed = true;
|
||||
this.lastDrawingMesh = false;
|
||||
this.drawingMesh = false;
|
||||
this.vertexCount = 0;
|
||||
|
||||
|
@ -100,9 +101,10 @@ SpriteBatch.prototype = {
|
|||
|
||||
shouldFlush: function ()
|
||||
{
|
||||
if (this.drawIndexed != this.lastDrawIndexed)
|
||||
if (this.drawIndexed != this.lastDrawIndexed || this.lastDrawingMesh !== this.drawingMesh)
|
||||
{
|
||||
this.lastDrawIndexed = this.drawIndexed;
|
||||
this.lastDrawingMesh = this.drawingMesh;
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
|
|
Loading…
Reference in a new issue