| 93 | } |
| 94 | |
| 95 | void DetachWindow() { |
| 96 | // This is called whenever the native window for our app is destroyed. That |
| 97 | // does not necessarily mean that the app is being killed, as it is also |
| 98 | // done when the screen rotates. |
| 99 | // |
| 100 | // For a more typical app where the rendering is done with OpenGL or Vulkan, |
| 101 | // this is where you'd perform any window cleanup needed by those |
| 102 | // frameworks. For our app, it's sufficient to just set a flag to disable |
| 103 | // our render loop. |
| 104 | window_initialized = false; |
| 105 | } |
| 106 | |
| 107 | /// Resumes ticking the application. |
| 108 | void Resume() { |