comparison src/video/uikit/SDL_uikitopenglview.m @ 5133:ec13e48ee0d9

Fixed bug #1112 (retina display support) Vittorio Giovara 2011-02-01 02:21:50 PST with the attached patch, the opengles context will always use the maximum screensize available; this is particularly useful for supporting retina display on latest iphone. please note: Apple documentation warns that using the "upscaled" gl context actually uses more memory and bandwitdh, so it might be worth to let the user decide whether to disable it or not, either with a flag or a sdl function...
author Sam Lantinga <slouken@libsdl.org>
date Tue, 01 Feb 2011 08:54:34 -0800
parents 5690ebc772c7
children 5f09cb749d75
comparison
equal deleted inserted replaced
5132:5690ebc772c7 5133:ec13e48ee0d9
114 114
115 if(glCheckFramebufferStatusOES(GL_FRAMEBUFFER_OES) != GL_FRAMEBUFFER_COMPLETE_OES) { 115 if(glCheckFramebufferStatusOES(GL_FRAMEBUFFER_OES) != GL_FRAMEBUFFER_COMPLETE_OES) {
116 return NO; 116 return NO;
117 } 117 }
118 /* end create buffers */ 118 /* end create buffers */
119
120 /* Use the main screen scale (for retina display support) */
121 if ([[UIScreen mainScreen] respondsToSelector:@selector(scale)])
122 self.contentScaleFactor = [UIScreen mainScreen].scale;
119 } 123 }
120 return self; 124 return self;
121 } 125 }
122 126
123 - (void)setCurrentContext { 127 - (void)setCurrentContext {