Reset SDLs GL state before reinitializing the renderer.

In the old world we deinitialized and reinitialized SDL each time we
restarted or changed the renderer. That would clear the whole GL state.
In the new world we let SDL running and just recreate the windows. In
some cases parts of the old renderers state would leak into the new
renderer, leading to strange problems.
This commit is contained in:
Yamagi Burmeister 2018-07-31 14:02:34 +02:00
parent bef21c101e
commit 6855f97487

View file

@ -250,6 +250,9 @@ GLimp_InitGraphics(int fullscreen, int *pwidth, int *pheight)
viddef.width = width;
viddef.height = height;
/* Reset SDL. */
SDL_GL_ResetAttributes();
/* Let renderer prepare things (set OpenGL attributes) */
flags = re.PrepareForWindow();