diff --git a/src/video/SDL_video.c b/src/video/SDL_video.c index 8c552d9a8..fd67442d6 100644 --- a/src/video/SDL_video.c +++ b/src/video/SDL_video.c @@ -1654,6 +1654,12 @@ SDL_RecreateWindow(SDL_Window * window, Uint32 flags) } else { SDL_GL_UnloadLibrary(); } + } else if (window->flags & SDL_WINDOW_OPENGL) { + SDL_GL_UnloadLibrary(); + if (SDL_GL_LoadLibrary(NULL) < 0) { + return -1; + } + loaded_opengl = SDL_TRUE; } if ((window->flags & SDL_WINDOW_VULKAN) != (flags & SDL_WINDOW_VULKAN)) {