fix clipping issue (#966)

* modify for clip

* fix clipping issue
This commit is contained in:
zzya 2017-08-16 02:27:26 +08:00 committed by Mario Zechner
parent bc337d255e
commit 5947520c9b

View File

@ -199,7 +199,10 @@ void SkeletonRenderer::draw (Renderer* renderer, const Mat4& transform, uint32_t
TwoColorTrianglesCommand* lastTwoColorTrianglesCommand = nullptr;
for (int i = 0, n = _skeleton->slotsCount; i < n; ++i) {
spSlot* slot = _skeleton->drawOrder[i];
if (!slot->attachment) continue;
if (!slot->attachment) {
spSkeletonClipping_clipEnd(_clipper, slot);
continue;
}
cocos2d::TrianglesCommand::Triangles triangles;
TwoColorTriangles trianglesTwoColor;
@ -268,6 +271,7 @@ void SkeletonRenderer::draw (Renderer* renderer, const Mat4& transform, uint32_t
spSkeletonClipping_clipStart(_clipper, slot, clip);
}
default:
spSkeletonClipping_clipEnd(_clipper, slot);
continue;
}