mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-02-04 22:34:53 +08:00
Removed blending caching (from master).
This commit is contained in:
parent
06e7037503
commit
aae761cd19
@ -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) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user