How To Cut The Sprite Into An Irregularly Shape Using Cocos2d Game Engine?
I need to show the picture in an irregularly shape. Not only a rect shape or some regularly shape else,but any shape I want.
Is it any way to cut the sprite,texture or image into an irregularly shape?
As far as I know, there is no API to archive the purpose. Maybe OpenGL is the best way to do this,but I have no idea about how to archive it and make it into a CCSprite.
I hope someone can help me, because I really really need it.Thanks a lot.
I achieved this using this tutorial for Cocos2d 2.0
http://www.raywenderlich.com/4428/how-to-mask-a-sprite-with-cocos2d-2-0
If you are using 1.0 you can use this one
http://www.raywenderlich.com/4421/how-to-mask-a-sprite-with-cocos2d-1-0