mirror of
https://github.com/Shpoike/Quakespasm.git
synced 2025-02-02 14:01:26 +00:00
Fog: move setting of GL_FOG_MODE to GL_EXP2 to a new Fog_SetupState() function and call it in VID_Restart.
Fixes bug where the fog mode was resetting to the default (GL_EXP) after a mode switch, causing fog to look different. This was only affecting SDL1 for me. git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1259 af15c1b1-3010-417e-b628-4374ebc0bcbd
This commit is contained in:
parent
f715aca4d1
commit
e2321d816b
3 changed files with 14 additions and 0 deletions
|
@ -394,5 +394,17 @@ void Fog_Init (void)
|
|||
fog_green = DEFAULT_GRAY;
|
||||
fog_blue = DEFAULT_GRAY;
|
||||
|
||||
Fog_SetupState ();
|
||||
}
|
||||
|
||||
/*
|
||||
=============
|
||||
Fog_SetupState
|
||||
|
||||
ericw -- moved from Fog_Init, state that needs to be setup when a new context is created
|
||||
=============
|
||||
*/
|
||||
void Fog_SetupState (void)
|
||||
{
|
||||
glFogi(GL_FOG_MODE, GL_EXP2);
|
||||
}
|
||||
|
|
|
@ -760,6 +760,7 @@ static void VID_Restart (void)
|
|||
GL_BuildBModelVertexBuffer ();
|
||||
GLMesh_LoadVertexBuffers ();
|
||||
GL_SetupState ();
|
||||
Fog_SetupState ();
|
||||
|
||||
//warpimages needs to be recalculated
|
||||
TexMgr_RecalcWarpImageSize ();
|
||||
|
|
|
@ -313,6 +313,7 @@ void Fog_StopAdditive (void);
|
|||
void Fog_SetupFrame (void);
|
||||
void Fog_NewMap (void);
|
||||
void Fog_Init (void);
|
||||
void Fog_SetupState (void);
|
||||
|
||||
void R_NewGame (void);
|
||||
|
||||
|
|
Loading…
Reference in a new issue