Ver código fonte

Fix to avoid excessive flushing of polygon batch.

It seems that when we use a starling SubTexture instead of an Spine texture, this line will trigger a lot of flushing instead of batching the polygons.
This fix avoid that.
Btw, you are using Animation.binarySearch1() in AnimationTimeline wich does not exists yet :-p
Sebastien Flory 11 anos atrás
pai
commit
5c154fd236

+ 1 - 1
spine-starling/spine-starling/src/spine/starling/PolygonBatch.as

@@ -125,7 +125,7 @@ internal class PolygonBatch {
 			_support.applyBlendMode(true);
 			_support.applyBlendMode(true);
 		}
 		}
 
 
-		if (texture != _texture) {
+		if (!_texture || texture.base != _texture.base) {
 			flush();
 			flush();
 			_texture = texture;
 			_texture = texture;
 		}
 		}