mirror of
https://github.com/photonstorm/phaser
synced 2024-11-14 00:47:29 +00:00
Testing if we can just pass off rendering directly.
This commit is contained in:
parent
3fa295f541
commit
71226a1548
1 changed files with 17 additions and 1 deletions
|
@ -70,10 +70,23 @@ var SpineContainerWebGLRenderer = function (renderer, container, camera, parentM
|
|||
sceneRenderer.begin();
|
||||
}
|
||||
|
||||
var rendererNextType = renderer.nextTypeMatch;
|
||||
|
||||
// Force these to avoid batch flushing
|
||||
renderer.nextTypeMatch = true;
|
||||
renderer.newType = false;
|
||||
|
||||
for (var i = 0; i < children.length; i++)
|
||||
{
|
||||
var src = children[i];
|
||||
|
||||
if (src.willRender(camera))
|
||||
{
|
||||
src.renderWebGL(renderer, src, camera, transformMatrix);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
var skeleton = src.skeleton;
|
||||
var childAlpha = skeleton.color.a;
|
||||
|
||||
|
@ -153,8 +166,11 @@ var SpineContainerWebGLRenderer = function (renderer, container, camera, parentM
|
|||
// Restore alpha
|
||||
skeleton.color.a = childAlpha;
|
||||
}
|
||||
*/
|
||||
|
||||
if (!renderer.nextTypeMatch)
|
||||
renderer.nextTypeMatch = rendererNextType;
|
||||
|
||||
if (!rendererNextType)
|
||||
{
|
||||
// The next object in the display list is not a Spine Game Object or Spine Container, so we end the batch
|
||||
sceneRenderer.end();
|
||||
|
|
Loading…
Reference in a new issue