mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2025-12-20 01:06:00 +08:00
[sdl][sfml][flutter] Fix clipping, closes #2431
This commit is contained in:
parent
4e1907812e
commit
40618ccf4e
@ -732,7 +732,10 @@ spine_render_command spine_skeleton_drawable_render(spine_skeleton_drawable draw
|
||||
for (unsigned i = 0; i < skeleton->getSlots().size(); ++i) {
|
||||
Slot &slot = *skeleton->getDrawOrder()[i];
|
||||
Attachment *attachment = slot.getAttachment();
|
||||
if (!attachment) continue;
|
||||
if (!attachment) {
|
||||
clipper.clipEnd(slot);
|
||||
continue;
|
||||
}
|
||||
|
||||
// Early out if the slot color is 0 or the bone is not active
|
||||
if (slot.getColor().a == 0 || !slot.getBone().isActive()) {
|
||||
|
||||
@ -74,7 +74,10 @@ void spSkeletonDrawable_draw(spSkeletonDrawable *self, struct SDL_Renderer *rend
|
||||
for (int i = 0; i < skeleton->slotsCount; ++i) {
|
||||
spSlot *slot = skeleton->drawOrder[i];
|
||||
spAttachment *attachment = slot->attachment;
|
||||
if (!attachment) continue;
|
||||
if (!attachment) {
|
||||
spSkeletonClipping_clipEnd(clipper, slot);
|
||||
continue;
|
||||
}
|
||||
|
||||
// Early out if the slot color is 0 or the bone is not active
|
||||
if (slot->color.a == 0 || !slot->bone->active) {
|
||||
|
||||
@ -70,7 +70,10 @@ void SkeletonDrawable::draw(SDL_Renderer *renderer) {
|
||||
for (unsigned i = 0; i < skeleton->getSlots().size(); ++i) {
|
||||
Slot &slot = *skeleton->getDrawOrder()[i];
|
||||
Attachment *attachment = slot.getAttachment();
|
||||
if (!attachment) continue;
|
||||
if (!attachment) {
|
||||
clipper.clipEnd(slot);
|
||||
continue;
|
||||
}
|
||||
|
||||
// Early out if the slot color is 0 or the bone is not active
|
||||
if (slot.getColor().a == 0 || !slot.getBone().isActive()) {
|
||||
|
||||
@ -168,7 +168,10 @@ namespace spine {
|
||||
for (int i = 0; i < skeleton->slotsCount; ++i) {
|
||||
spSlot *slot = skeleton->drawOrder[i];
|
||||
spAttachment *attachment = slot->attachment;
|
||||
if (!attachment) continue;
|
||||
if (!attachment) {
|
||||
spSkeletonClipping_clipEnd(clipper, slot);
|
||||
continue;
|
||||
}
|
||||
|
||||
// Early out if slot is invisible
|
||||
if (slot->color.a == 0 || !slot->bone->active) {
|
||||
|
||||
@ -94,7 +94,10 @@ namespace spine {
|
||||
for (unsigned i = 0; i < skeleton->getSlots().size(); ++i) {
|
||||
Slot &slot = *skeleton->getDrawOrder()[i];
|
||||
Attachment *attachment = slot.getAttachment();
|
||||
if (!attachment) continue;
|
||||
if (!attachment) {
|
||||
clipper.clipEnd(slot);
|
||||
continue;
|
||||
}
|
||||
|
||||
// Early out if the slot color is 0 or the bone is not active
|
||||
if (slot.getColor().a == 0 || !slot.getBone().isActive()) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user