Tweaked Graphics to only flush SpriteBatch if it has children to render
This commit is contained in:
parent
aeac4a5f4e
commit
73aa9dca93
3 changed files with 25 additions and 15 deletions
|
@ -7414,6 +7414,9 @@ PIXI.Graphics.prototype._renderWebGL = function(renderSession)
|
|||
|
||||
PIXI.WebGLGraphics.renderGraphics(this, renderSession);
|
||||
|
||||
// only rende rif it has children!
|
||||
if(this.children.length)
|
||||
{
|
||||
renderSession.spriteBatch.start();
|
||||
|
||||
// simple render children!
|
||||
|
@ -7424,6 +7427,8 @@ PIXI.Graphics.prototype._renderWebGL = function(renderSession)
|
|||
|
||||
renderSession.spriteBatch.stop();
|
||||
|
||||
}
|
||||
|
||||
if(this._filters)renderSession.filterManager.popFilter();
|
||||
if(this._mask)renderSession.maskManager.popMask(renderSession);
|
||||
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -331,6 +331,9 @@ PIXI.Graphics.prototype._renderWebGL = function(renderSession)
|
|||
|
||||
PIXI.WebGLGraphics.renderGraphics(this, renderSession);
|
||||
|
||||
// only rende rif it has children!
|
||||
if(this.children.length)
|
||||
{
|
||||
renderSession.spriteBatch.start();
|
||||
|
||||
// simple render children!
|
||||
|
@ -341,6 +344,8 @@ PIXI.Graphics.prototype._renderWebGL = function(renderSession)
|
|||
|
||||
renderSession.spriteBatch.stop();
|
||||
|
||||
}
|
||||
|
||||
if(this._filters)renderSession.filterManager.popFilter();
|
||||
if(this._mask)renderSession.maskManager.popMask(renderSession);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue