I'm wondering what is the fastest way to visualize a pixel raster from memory to the screen of iOS devices to achieve the highest possible frame rate. I can imagine two approaches:
- Create a CGImage with a CGImageCreate, draw it on the screen using the CGContextDrawImage in the drawRect method, and then delete the CGImage object
- Use OpenGL in spelling mode, copy the pixels into the texture using glTexImage2D and create a square with this texture
Probably the second approach will be faster than the first. But will it be much faster or slightly? And is there a third way to do this that will be faster than the first two that I mentioned?
source
share