diff --git a/spine-libgdx/spine-libgdx/src/com/esotericsoftware/spine/SkeletonMeshRenderer.java b/spine-libgdx/spine-libgdx/src/com/esotericsoftware/spine/SkeletonMeshRenderer.java index e6db7b114..dcd7c0285 100644 --- a/spine-libgdx/spine-libgdx/src/com/esotericsoftware/spine/SkeletonMeshRenderer.java +++ b/spine-libgdx/spine-libgdx/src/com/esotericsoftware/spine/SkeletonMeshRenderer.java @@ -35,9 +35,9 @@ import com.badlogic.gdx.graphics.Texture; import com.badlogic.gdx.graphics.g2d.PolygonSpriteBatch; import com.badlogic.gdx.utils.Array; import com.esotericsoftware.spine.attachments.Attachment; +import com.esotericsoftware.spine.attachments.MeshAttachment; import com.esotericsoftware.spine.attachments.RegionAttachment; import com.esotericsoftware.spine.attachments.SkeletonAttachment; -import com.esotericsoftware.spine.attachments.MeshAttachment; public class SkeletonMeshRenderer extends SkeletonRenderer { static private final short[] quadTriangles = {0, 1, 2, 2, 3, 0}; @@ -45,7 +45,6 @@ public class SkeletonMeshRenderer extends SkeletonRenderer { @SuppressWarnings("null") public void draw (PolygonSpriteBatch batch, Skeleton skeleton) { boolean premultipliedAlpha = this.premultipliedAlpha; - BlendMode blendMode = null; float[] vertices = null; short[] triangles = null; @@ -90,11 +89,8 @@ public class SkeletonMeshRenderer extends SkeletonRenderer { } if (texture != null) { - 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(texture, vertices, 0, vertices.length, triangles, 0, triangles.length); } } diff --git a/spine-libgdx/spine-libgdx/src/com/esotericsoftware/spine/SkeletonRenderer.java b/spine-libgdx/spine-libgdx/src/com/esotericsoftware/spine/SkeletonRenderer.java index 5a4321727..a26715590 100644 --- a/spine-libgdx/spine-libgdx/src/com/esotericsoftware/spine/SkeletonRenderer.java +++ b/spine-libgdx/spine-libgdx/src/com/esotericsoftware/spine/SkeletonRenderer.java @@ -43,7 +43,6 @@ public class SkeletonRenderer { public void draw (T batch, Skeleton skeleton) { boolean premultipliedAlpha = this.premultipliedAlpha; - BlendMode blendMode = null; Array drawOrder = skeleton.drawOrder; for (int i = 0, n = drawOrder.size; i < n; i++) { @@ -52,11 +51,8 @@ public class SkeletonRenderer { 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) {