From d46476af923ede7d0ccde5d0d4fd5f0606edba4e Mon Sep 17 00:00:00 2001 From: Duy Tran Khanh <40482367+khanhduytran0@users.noreply.github.com> Date: Wed, 6 Jan 2021 18:55:34 +0700 Subject: [PATCH] Try to stop auto swap buffers... --- Natives/ViewController.m | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/Natives/ViewController.m b/Natives/ViewController.m index 03effe02..7c02afda 100644 --- a/Natives/ViewController.m +++ b/Natives/ViewController.m @@ -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);