mirror of
https://github.com/UberGames/lilium-voyager.git
synced 2024-11-10 06:31:47 +00:00
Clear window buffer when it's created
When starting the game in windowed mode, the window buffer used whatever was on the screen before running the game. Kind of like you could see through the window, but it doesn't update what happens behind it. It makes it look like something is broken or non-responsive. So clear the window opengl buffer to black. Credit to theinvsblman for the code.
This commit is contained in:
parent
1ad2b413ef
commit
1d016e6ff5
1 changed files with 4 additions and 0 deletions
|
@ -462,6 +462,10 @@ static int GLimp_SetMode(int mode, qboolean fullscreen, qboolean noborder)
|
|||
continue;
|
||||
}
|
||||
|
||||
qglClearColor( 0, 0, 0, 1 );
|
||||
qglClear( GL_COLOR_BUFFER_BIT );
|
||||
SDL_GL_SwapWindow( SDL_window );
|
||||
|
||||
SDL_GL_SetSwapInterval( r_swapInterval->integer );
|
||||
|
||||
glConfig.colorBits = testColorBits;
|
||||
|
|
Loading…
Reference in a new issue