Try to stop auto swap buffers...

This commit is contained in:
Duy Tran Khanh authored and GitHub committed 2021-01-06 18:55:34 +07:00
1 parent 94f837a96a
commit d46476af92
1 file changed
+9 -2
+9 -2
View File
@@ -36,6 +36,14 @@
[self setupGL];
}
- (void)viewWillAppear:(BOOL)animated
{
[super viewWillAppear:animated];
[self setPaused:YES];
resumeOnDidBecomeActive = NO;
}
- (void)dealloc
{
if ([EAGLContext currentContext] == self.context) {
@@ -46,8 +54,7 @@
- (void)setupGL
{
[EAGLContext setCurrentContext:self.context];
self.paused = YES;
glClearColor(0.1, 0.1f, 0.1f, 1.0f);
glClear(GL_COLOR_BUFFER_BIT);