mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-03-26 22:49:01 +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) {
|
public void draw (T batch, Skeleton skeleton) {
|
||||||
boolean premultipliedAlpha = this.premultipliedAlpha;
|
boolean premultipliedAlpha = this.premultipliedAlpha;
|
||||||
BlendMode blendMode = null;
|
|
||||||
|
|
||||||
Array<Slot> drawOrder = skeleton.drawOrder;
|
Array<Slot> drawOrder = skeleton.drawOrder;
|
||||||
for (int i = 0, n = drawOrder.size; i < n; i++) {
|
for (int i = 0, n = drawOrder.size; i < n; i++) {
|
||||||
@ -51,11 +50,8 @@ public class SkeletonRenderer<T extends Batch> {
|
|||||||
if (attachment instanceof RegionAttachment) {
|
if (attachment instanceof RegionAttachment) {
|
||||||
RegionAttachment regionAttachment = (RegionAttachment)attachment;
|
RegionAttachment regionAttachment = (RegionAttachment)attachment;
|
||||||
float[] vertices = regionAttachment.updateWorldVertices(slot, premultipliedAlpha);
|
float[] vertices = regionAttachment.updateWorldVertices(slot, premultipliedAlpha);
|
||||||
BlendMode slotBlendMode = slot.data.getBlendMode();
|
BlendMode blendMode = slot.data.getBlendMode();
|
||||||
if (slotBlendMode != blendMode) {
|
batch.setBlendFunction(blendMode.getSource(premultipliedAlpha), blendMode.getDest());
|
||||||
blendMode = slotBlendMode;
|
|
||||||
batch.setBlendFunction(blendMode.getSource(premultipliedAlpha), blendMode.getDest());
|
|
||||||
}
|
|
||||||
batch.draw(regionAttachment.getRegion().getTexture(), vertices, 0, 20);
|
batch.draw(regionAttachment.getRegion().getTexture(), vertices, 0, 20);
|
||||||
|
|
||||||
} else if (attachment instanceof MeshAttachment) {
|
} else if (attachment instanceof MeshAttachment) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user