I'm working on a game in which the game elements look like they are made of construction paper. To achieve the texture effect I blend a fullscreen image at the end of each draw cycle:
- (void)drawRect:(CGRect)rect {
CGContextRef context = UIGraphicsGetCurrentContext();
// ... draw things ... //
CGContextSetBlendMode(context, kCGBlendModeHardLight);
CGContextSetAlpha(context, 0.4);
CGContextDrawImage(context, [self frame], [paperTexture CGImage]);
}
Unfortunately this makes the frame rate drop from 60 to what feels like ~10. Is there a better way to do this without moving into OpenGL?