Skip to content
This repository has been archived by the owner. It is now read-only.
Permalink
Browse files

Fixed where we set the content scale - it's used by the renderbufferS…

…torage:GL_RENDERBUFFER_OES call.
  • Loading branch information
slouken committed Nov 17, 2011
1 parent a5f7ee4 commit cb0ed63a175186d0b7f23d7b40358e310dfb3d8a
Showing with 5 additions and 10 deletions.
  1. +5 −10 src/video/uikit/SDL_uikitopenglview.m
@@ -78,6 +78,11 @@ - (id)initWithFrame:(CGRect)frame
return nil;
}

// !!! FIXME: use the screen this is on!
/* Use the main screen scale (for retina display support) */
if ([[UIScreen mainScreen] respondsToSelector:@selector(scale)])
self.contentScaleFactor = [UIScreen mainScreen].scale;

/* create the buffers */
glGenFramebuffersOES(1, &viewFramebuffer);
glGenRenderbuffersOES(1, &viewRenderbuffer);
@@ -115,11 +120,6 @@ - (id)initWithFrame:(CGRect)frame
}
/* end create buffers */

// !!! FIXME: use the screen this is on!
/* Use the main screen scale (for retina display support) */
if ([[UIScreen mainScreen] respondsToSelector:@selector(scale)])
self.contentScaleFactor = [UIScreen mainScreen].scale;

self.autoresizingMask = 0; // don't allow autoresize, since we need to do some magic in -(void)updateFrame.
}
return self;
@@ -144,11 +144,6 @@ - (void)updateFrame
glBindRenderbufferOES(GL_RENDERBUFFER_OES, depthRenderbuffer);
glRenderbufferStorageOES(GL_RENDERBUFFER_OES, depthBufferFormat, backingWidth, backingHeight);
}

// !!! FIXME: use the screen this is on!
/* Use the main screen scale (for retina display support) */
if ([[UIScreen mainScreen] respondsToSelector:@selector(scale)])
self.contentScaleFactor = [UIScreen mainScreen].scale;
}

- (void)setCurrentContext

0 comments on commit cb0ed63

Please sign in to comment.