Trying to fix second draw frame crashes
Yay it almost works! First frame rendered! (rd-132211)
This commit is contained in:
1 parent
7efb0b6273
commit
69b16d33db
1 file changed
+14
-2
@@ -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
|
||||
Reference in new issue
Block a user