Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can the full 326 ppi of iOS 4 be used for openGL?

While testing my openGL ES app on the new iPhone 4, it seemed as if the openGL wasn't using all 326 ppi, rather the 163 ppi found on the 3G, because of noticeable pixelation. I realize there are 4 times more pixels to calculate, but shouldn't the A4 chip compensate for this?

I'm sure there is a way to take advantage of the stunning resolution, as I have seen in apps on the iTunes Store, but how?

like image 618
pop850 Avatar asked Jul 03 '10 02:07

pop850


1 Answers

Yes, its quite easy too actually. By default the OpenGL view uses the old scale mode as to not break existing applications because it is a pixel based API rather than a point based API.

To fix this, set the contentsScale of your CAEAGLLayer to 2.0 and bask in the glory.

like image 92
Joshua Weinberg Avatar answered Sep 28 '22 16:09

Joshua Weinberg