| 141 | } |
| 142 | |
| 143 | void shutdown() |
| 144 | { |
| 145 | if (!g_Initialized) |
| 146 | return; |
| 147 | |
| 148 | // Cleanup |
| 149 | ImGui_ImplOpenGL3_Shutdown(); |
| 150 | ImGui_ImplAndroid_Shutdown(); |
| 151 | // ImGui::DestroyContext(); |
| 152 | |
| 153 | if (g_EglDisplay != EGL_NO_DISPLAY) |
| 154 | { |
| 155 | eglMakeCurrent(g_EglDisplay, EGL_NO_SURFACE, EGL_NO_SURFACE, EGL_NO_CONTEXT); |
| 156 | |
| 157 | if (g_EglContext != EGL_NO_CONTEXT) |
| 158 | eglDestroyContext(g_EglDisplay, g_EglContext); |
| 159 | |
| 160 | if (g_EglSurface != EGL_NO_SURFACE) |
| 161 | eglDestroySurface(g_EglDisplay, g_EglSurface); |
| 162 | |
| 163 | eglTerminate(g_EglDisplay); |
| 164 | } |
| 165 | |
| 166 | g_EglDisplay = EGL_NO_DISPLAY; |
| 167 | g_EglContext = EGL_NO_CONTEXT; |
| 168 | g_EglSurface = EGL_NO_SURFACE; |
| 169 | ANativeWindow_release(g_App->window); |
| 170 | |
| 171 | g_Initialized = false; |
| 172 | } |
| 173 | |
| 174 | static void handleAppCmd(struct android_app *app, int32_t appCmd) |
| 175 | { |
no test coverage detected