SDL: Add a way to reset OpenGL graphics by pressing F7.

This commit is contained in:
Henrik Rydgård
2022-12-29 16:14:54 +01:00
parent 7912eef0b7
commit d167a11b1c
3 changed files with 50 additions and 8 deletions
+3
View File
@@ -449,9 +449,12 @@ void SDLGLGraphicsContext::Shutdown() {
void SDLGLGraphicsContext::ShutdownFromRenderThread() {
delete draw_;
draw_ = nullptr;
renderManager_ = nullptr;
#ifdef USING_EGL
EGL_Close();
#endif
SDL_GL_DeleteContext(glContext);
glContext = nullptr;
window_ = nullptr;
}