Reputation: 305
I am trying to display an image using OpenGL ES in iOS. But image is covering only one quadrant of the screen. How can I show it to full screen?
Upvotes: 2
Views: 636
Reputation: 496
You can determine that programmatically by checking [UIScreen mainScreen].scale; then setting the glkView.contentScaleFactor. You should not be hard coding a scale value.
_glkView.contentScaleFactor = [UIScreen mainScreen].scale;
Upvotes: 0
Reputation: 305
I have found the solution. The problem is with setting the contentScaleFactor of UIView. By default, it is 2.0 for retina displays. So, it should be set to 1.0. Here is the link for more details: UIView ContentScaleFactor
Upvotes: 3