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

[cocos2d-x] Added early out check for MeshAttachment alpha == 0. Related to commit 254baf4. See #1708.

Harald Csaszar 5 жил өмнө
parent
commit
46a0ffce50

+ 4 - 0
spine-cocos2dx/src/spine/SkeletonRenderer.cpp

@@ -930,6 +930,10 @@ namespace spine {
 				if (static_cast<RegionAttachment*>(attachment)->getColor().a == 0)
 					return true;
 			}
+			else if (attachment->getRTTI().isExactly(MeshAttachment::rtti)) {
+				if (static_cast<MeshAttachment*>(attachment)->getColor().a == 0)
+					return true;
+			}
 			return false;
 		}