Original Post
Hi all, Without testing or anything whatsoever, I developed my entire framework around core graphics on iPhone. I set up a timer for 60 Hz and every frame I reset the view and draw the following images: 320x480 (4x - background) Here is my draw function that is called every time timer is fired: I removed all interaction code, everything and the game runs around 20 Hz. If I draw colored rectangles instead of images from PNGs, it runs around 55Hz. Is this expected (as in you can't make a 2D game with textures using CG on iPhone) or am I doing something terribly wrong?
- (void)drawRect:(CGRect)rect
{
if( !context )
context = UIGraphicsGetCurrentContext();
//Draw background
CGContextDrawImage(context, CGRectMake(0,0,320, 480), background1Image);
CGContextDrawImage(context, CGRectMake(0,0,320, 480), background2Image);
CGContextDrawImage(context, CGRectMake(0,0,320, 480), background3Image);
CGContextDrawImage(context, CGRectMake(0,0,320, 480), background4Image);
}