diff --git a/Natives/ViewController.m b/Natives/ViewController.m index dd8d4b00..03effe02 100644 --- a/Natives/ViewController.m +++ b/Natives/ViewController.m @@ -46,11 +46,23 @@ - (void)setupGL { [EAGLContext setCurrentContext:self.context]; + self.paused = YES; + glClearColor(0.1, 0.1f, 0.1f, 1.0f); + glClear(GL_COLOR_BUFFER_BIT); + + CGRect screenBounds = [[UIScreen mainScreen] bounds]; + CGFloat screenScale = [[UIScreen mainScreen] scale]; + + int width_c = (int) roundf(screenBounds.size.width * screenScale); + int height_c = (int) roundf(screenBounds.size.height * screenScale); + glViewport(0, 0, width_c, height_c); + + callback_AppDelegate_didFinishLaunching(width_c, height_c); } #pragma mark - GLKView and GLKViewController delegate methods - +/* int called = 0; - (void)glkView:(GLKView *)view drawInRect:(CGRect)rect { @@ -61,5 +73,5 @@ int called = 0; self.paused = YES; } } - +*/ @end