How to draw a solid circle with cocos2d for iPhone

cocos2d-iphone, geometry, iphone, opengl-es

Solution

In DrawingPrimitives.m, change this in drawCricle:

glDrawArrays(GL_LINE_STRIP, 0, segs+additionalSegment);

to:

glDrawArrays(GL_TRIANGLE_FAN, 0, segs+additionalSegment);

You can read more about opengl primitives here: http://www.informit.com/articles/article.aspx?p=461848

Problem

Is it possible to draw a filled circle with cocos2d ? An outlined circle can be done using the drawCircle() function, but is there a way to fill it in a certain color? Perhaps by using pure OpenGL?

Original source