mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2025-12-21 01:36:02 +08:00
Merge branch '4.0' into 4.1-beta
This commit is contained in:
commit
c80fd56ce3
@ -907,18 +907,23 @@ namespace spine {
|
|||||||
return startSlotIndex > index || endSlotIndex < index;
|
return startSlotIndex > index || endSlotIndex < index;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool nothingToDraw(Slot &slot, int startSlotIndex, int endSlotIndex) {
|
bool nothingToDraw(Slot& slot, int startSlotIndex, int endSlotIndex) {
|
||||||
Attachment *attachment = slot.getAttachment();
|
Attachment *attachment = slot.getAttachment();
|
||||||
if (!attachment ||
|
if (!attachment ||
|
||||||
slotIsOutRange(slot, startSlotIndex, endSlotIndex) ||
|
slotIsOutRange(slot, startSlotIndex, endSlotIndex) ||
|
||||||
!slot.getBone().isActive() ||
|
!slot.getBone().isActive())
|
||||||
slot.getColor().a == 0)
|
|
||||||
return true;
|
return true;
|
||||||
if (attachment->getRTTI().isExactly(RegionAttachment::rtti)) {
|
const auto& attachmentRTTI = attachment->getRTTI();
|
||||||
if (static_cast<RegionAttachment *>(attachment)->getColor().a == 0)
|
if (attachmentRTTI.isExactly(ClippingAttachment::rtti))
|
||||||
|
return false;
|
||||||
|
if (slot.getColor().a == 0)
|
||||||
return true;
|
return true;
|
||||||
} else if (attachment->getRTTI().isExactly(MeshAttachment::rtti)) {
|
if (attachmentRTTI.isExactly(RegionAttachment::rtti)) {
|
||||||
if (static_cast<MeshAttachment *>(attachment)->getColor().a == 0)
|
if (static_cast<RegionAttachment*>(attachment)->getColor().a == 0)
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
else if (attachmentRTTI.isExactly(MeshAttachment::rtti)) {
|
||||||
|
if (static_cast<MeshAttachment*>(attachment)->getColor().a == 0)
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user