diff options
author | Alex Zolotarev <deathbaba@gmail.com> | 2012-03-15 18:41:47 +0400 |
---|---|---|
committer | Alex Zolotarev <alex@maps.me> | 2015-09-23 01:36:44 +0300 |
commit | bd68226eee6173b021d6549a055f5a76b314ca6a (patch) | |
tree | 36ab143607ac2c3f0847d41f4140abce964c86ed /iphone/Maps/Classes/EAGLView.mm | |
parent | 2553e046442724f90edf7e2bc86430d1f5897a53 (diff) |
[ios] Fixed VisualScale for iPad3 support
Diffstat (limited to 'iphone/Maps/Classes/EAGLView.mm')
-rw-r--r-- | iphone/Maps/Classes/EAGLView.mm | 24 |
1 files changed, 5 insertions, 19 deletions
diff --git a/iphone/Maps/Classes/EAGLView.mm b/iphone/Maps/Classes/EAGLView.mm index a223cde32b..e707d04275 100644 --- a/iphone/Maps/Classes/EAGLView.mm +++ b/iphone/Maps/Classes/EAGLView.mm @@ -41,7 +41,7 @@ eaglLayer.opaque = YES; renderContext = shared_ptr<iphone::RenderContext>(new iphone::RenderContext()); - + if (!renderContext.get()) { [self release]; @@ -50,30 +50,16 @@ renderContext->makeCurrent(); - /// ColorFormat : RGB565 - /// Backbuffer : YES, (to prevent from loosing content when mixing with ordinary layers). + // ColorFormat : RGB565 + // Backbuffer : YES, (to prevent from loosing content when mixing with ordinary layers). eaglLayer.drawableProperties = [NSDictionary dictionaryWithObjectsAndKeys: [NSNumber numberWithBool:NO], kEAGLDrawablePropertyRetainedBacking, kEAGLColorFormatRGB565, kEAGLDrawablePropertyColorFormat, nil]; - - int etalonW = 320; - int scrW = etalonW; - - UIDevice * device = [UIDevice currentDevice]; - - float ver = [device.systemVersion floatValue]; - NSLog(@"%@", device.systemVersion); - /// rounding problems - if (ver >= 3.199) - { - UIScreen * mainScr = [UIScreen mainScreen]; - scrW = mainScr.currentMode.size.width; - if (scrW == 640) - self.contentScaleFactor = 2.0; - } + // Correct retina display support in opengl renderbuffer + self.contentScaleFactor = [[UIScreen mainScreen] scale]; } return self; |