Hey all,
In my app the user draws needs to draw a line. But When he does it causes a serious drop in frame rate. The line is drawn by putting the user's touches into an array and then using this loop.
for(int i = 0; i < [touchArray count]; i+=2)
{
glColor4ub(255,0,0,255);
CGPoint start = [touchArray objectAtIndex:i];
CGPoint end = [touchArray objectAtIndex:i+1];
ccDrawLine(start, end);
[player1 setDestination:end];
}
This code draws the line fine but if the line is long then the frame rate drops. I am also need to run this code for 5 different lines. Is there a better way of drawing the line or is there a way to keep the frame rate up?
Thanks
Clinton