I'm having trouble finding a way to draw a solid or filled polygon in cocos2d. This is what i have so far:
(init method)
vertices[0] = ccp(768, 1);
vertices[1] = ccp(768, 767);
vertices[2] = ccp(1023, 767);
vertices[3] = ccp(1023, 1);
(draw method)
glColor4ub(255, 255, 255, 255);
ccDrawPoly(vertices, 4, YES);
and this draws an outline of a rectangle as expected. so is there an easy way to draw a solid rectangle? my guess would be to use some kind of triangle fan method of drawing polygons but i have no idea where i could find such a method. any help i appreciated