Removed blending caching (from master).

This commit is contained in:
NathanSweet 2016-10-13 18:04:43 +02:00
parent 06e7037503
commit aae761cd19

View File

@ -42,7 +42,6 @@ public class SkeletonRenderer<T extends Batch> {
public void draw (T batch, Skeleton skeleton) {
boolean premultipliedAlpha = this.premultipliedAlpha;
BlendMode blendMode = null;
Array<Slot> drawOrder = skeleton.drawOrder;
for (int i = 0, n = drawOrder.size; i < n; i++) {
@ -51,11 +50,8 @@ public class SkeletonRenderer<T extends Batch> {
if (attachment instanceof RegionAttachment) {
RegionAttachment regionAttachment = (RegionAttachment)attachment;
float[] vertices = regionAttachment.updateWorldVertices(slot, premultipliedAlpha);
BlendMode slotBlendMode = slot.data.getBlendMode();
if (slotBlendMode != blendMode) {
blendMode = slotBlendMode;
batch.setBlendFunction(blendMode.getSource(premultipliedAlpha), blendMode.getDest());
}
BlendMode blendMode = slot.data.getBlendMode();
batch.setBlendFunction(blendMode.getSource(premultipliedAlpha), blendMode.getDest());
batch.draw(regionAttachment.getRegion().getTexture(), vertices, 0, 20);
} else if (attachment instanceof MeshAttachment) {