mirror of
https://github.com/photonstorm/phaser
synced 2024-11-25 06:00:41 +00:00
If it won't render but the batch is open, flush it
This commit is contained in:
parent
27e9e66299
commit
76eb71345d
1 changed files with 17 additions and 1 deletions
|
@ -28,8 +28,24 @@ var SpineGameObjectWebGLRenderer = function (renderer, src, interpolationPercent
|
||||||
var skeleton = src.skeleton;
|
var skeleton = src.skeleton;
|
||||||
var sceneRenderer = plugin.sceneRenderer;
|
var sceneRenderer = plugin.sceneRenderer;
|
||||||
|
|
||||||
if (!skeleton)
|
var GameObjectRenderMask = 15;
|
||||||
|
|
||||||
|
var willRender = !(GameObjectRenderMask !== src.renderFlags || (src.cameraFilter !== 0 && (src.cameraFilter & camera.id)));
|
||||||
|
|
||||||
|
if (!skeleton || !willRender)
|
||||||
{
|
{
|
||||||
|
// Reset the current type
|
||||||
|
renderer.currentType = '';
|
||||||
|
|
||||||
|
// If there is already a batch running, we need to close it
|
||||||
|
if (!renderer.nextTypeMatch)
|
||||||
|
{
|
||||||
|
// The next object in the display list is not a Spine object, so we end the batch
|
||||||
|
sceneRenderer.end();
|
||||||
|
|
||||||
|
renderer.rebindPipeline(renderer.pipelines.TextureTintPipeline);
|
||||||
|
}
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue