Эх сурвалжийг харах

[cocos2d-objc] Fix clipping of meshes.

Mario Zechner 2 жил өмнө
parent
commit
5eeec39224

+ 2 - 0
spine-cocos2d-objc/src/spine/SkeletonRenderer.m

@@ -193,6 +193,7 @@ static bool handlerQueued = false;
 	float r = 0, g = 0, b = 0, a = 0;
 	float dr = 0, dg = 0, db = 0, da = _premultipliedAlpha ? 1 : 0;
 	for (int i = 0, n = _skeleton->slotsCount; i < n; i++) {
+		vertices = _worldVertices;
 		spSlot* slot = _skeleton->drawOrder[i];
 		if (!slot->attachment) continue;
 		if (!slot->bone->active) continue;
@@ -229,6 +230,7 @@ static bool handlerQueued = false;
 		case SP_ATTACHMENT_CLIPPING: {
 			spClippingAttachment* clip = (spClippingAttachment*)slot->attachment;
 			spSkeletonClipping_clipStart(_clipper, slot, clip);
+            continue;
 		}
 		default: ;
 		}