ios/ViewController.mm : Add a comment about a future optimization

This commit is contained in:
Henrik Rydgard 2016-12-21 17:40:16 +01:00
parent 49ce7178f5
commit bb4920298b

View File

@ -148,8 +148,7 @@ static GraphicsContext *graphicsContext;
self.view.multipleTouchEnabled = YES;
self.context = [[EAGLContext alloc] initWithAPI:kEAGLRenderingAPIOpenGLES3];
if (!self.context)
{
if (!self.context) {
self.context = [[EAGLContext alloc] initWithAPI:kEAGLRenderingAPIOpenGLES2];
}
@ -159,6 +158,9 @@ static GraphicsContext *graphicsContext;
[EAGLContext setCurrentContext:self.context];
self.preferredFramesPerSecond = 60;
// Might be useful for a speed boot, sacrificing resolution:
// view.contentScaleFactor = 1.0;
float scale = [UIScreen mainScreen].scale;
if ([[UIScreen mainScreen] respondsToSelector:@selector(nativeScale)]) {
@ -167,8 +169,7 @@ static GraphicsContext *graphicsContext;
CGSize size = [[UIApplication sharedApplication].delegate window].frame.size;
if (size.height > size.width)
{
if (size.height > size.width) {
float h = size.height;
size.height = size.width;
size.width = h;