我正在玩 cocos2d-iphone,它看起来很棒!
但是我想为每次更新在屏幕上绘制另一个圆圈,这会非常快地降低帧速率!我可以以更快的方式绘制多个图元吗?
这是我目前使用的代码
-(void) draw
{
glLineWidth(1);
glColor4ub(100,100,255,0);
float angle = 0;
float radius = 10.0f;
int numSegments = 10;
bool drawLineToCenter = NO;
NSInteger point;
for (point=0;point < [points count];point++)
{
ccDrawCircle([[points objectAtIndex:point] CGPointValue], radius, angle, numSegments, drawLineToCenter);
}
}