mirror of
https://github.com/yquake2/yquake2remaster.git
synced 2025-04-11 12:40:45 +00:00
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:
parent
bef21c101e
commit
6855f97487
1 changed files with 3 additions and 0 deletions
|
@ -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();
|
||||
|
||||
|
|
Loading…
Reference in a new issue