mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2025-12-21 01:36:02 +08:00
[cocos2dx] Fix culling of clip attachments. See https://github.com/EsotericSoftware/spine-runtimes/pull/2011
This commit is contained in:
parent
b1d396cf55
commit
c312c373c0
@ -912,13 +912,18 @@ namespace spine {
|
|||||||
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 (attachmentRTTI.isExactly(ClippingAttachment::rtti))
|
||||||
|
return false;
|
||||||
|
if (slot.getColor().a == 0)
|
||||||
|
return true;
|
||||||
|
if (attachmentRTTI.isExactly(RegionAttachment::rtti)) {
|
||||||
if (static_cast<RegionAttachment*>(attachment)->getColor().a == 0)
|
if (static_cast<RegionAttachment*>(attachment)->getColor().a == 0)
|
||||||
return true;
|
return true;
|
||||||
} else if (attachment->getRTTI().isExactly(MeshAttachment::rtti)) {
|
}
|
||||||
|
else if (attachmentRTTI.isExactly(MeshAttachment::rtti)) {
|
||||||
if (static_cast<MeshAttachment*>(attachment)->getColor().a == 0)
|
if (static_cast<MeshAttachment*>(attachment)->getColor().a == 0)
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user