so I would like to create a circle shape with primitives on cocos2d and then use it as a sprite, How can I do it please ?
I know that I have to use something like this :
glLineWidth(16);
glColor4ub(0, 255, 0, 255);
drawCircle( ccp(s.width/2, s.height/2), 100, 0, 10, NO);
But it’s hard for me to understand how it works and How to use it as a sprite
do you really need CCSprite instance? you can create a subclass of CCNode, then in its
method put your code there. your circle will have it’s center position (0.f, 0.f)
wrote this piece of code right here, didn’t copy from xcode, but it should work as you want. ccDrawCircle is a cocos2d function, declared in CCDrawingPrimitives.h