mirror of
https://github.com/Shpoike/Quakespasm.git
synced 2025-03-13 06:13:39 +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+ssh://svn.code.sf.net/p/quakespasm/code/trunk@1259 af15c1b1-3010-417e-b628-4374ebc0bcbd
This commit is contained in:
parent
11913c0ded
commit
b63744399e
3 changed files with 14 additions and 0 deletions
|
@ -394,5 +394,17 @@ void Fog_Init (void)
|
||||||
fog_green = DEFAULT_GRAY;
|
fog_green = DEFAULT_GRAY;
|
||||||
fog_blue = 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);
|
glFogi(GL_FOG_MODE, GL_EXP2);
|
||||||
}
|
}
|
||||||
|
|
|
@ -760,6 +760,7 @@ static void VID_Restart (void)
|
||||||
GL_BuildBModelVertexBuffer ();
|
GL_BuildBModelVertexBuffer ();
|
||||||
GLMesh_LoadVertexBuffers ();
|
GLMesh_LoadVertexBuffers ();
|
||||||
GL_SetupState ();
|
GL_SetupState ();
|
||||||
|
Fog_SetupState ();
|
||||||
|
|
||||||
//warpimages needs to be recalculated
|
//warpimages needs to be recalculated
|
||||||
TexMgr_RecalcWarpImageSize ();
|
TexMgr_RecalcWarpImageSize ();
|
||||||
|
|
|
@ -313,6 +313,7 @@ void Fog_StopAdditive (void);
|
||||||
void Fog_SetupFrame (void);
|
void Fog_SetupFrame (void);
|
||||||
void Fog_NewMap (void);
|
void Fog_NewMap (void);
|
||||||
void Fog_Init (void);
|
void Fog_Init (void);
|
||||||
|
void Fog_SetupState (void);
|
||||||
|
|
||||||
void R_NewGame (void);
|
void R_NewGame (void);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue