mirror of
https://github.com/YGGverse/xash3d-fwgs.git
synced 2025-01-25 22:34:24 +00:00
ref: gl: remove vid_gamma/vid_brightness changed cvar value check
This commit is contained in:
parent
9fa32a9cf4
commit
c0757bd84c
@ -560,8 +560,6 @@ qboolean VID_CubemapShot( const char *base, uint size, const float *vieworg, qbo
|
|||||||
// use client vieworg
|
// use client vieworg
|
||||||
if( !vieworg ) vieworg = RI.vieworg;
|
if( !vieworg ) vieworg = RI.vieworg;
|
||||||
|
|
||||||
R_CheckGamma();
|
|
||||||
|
|
||||||
for( i = 0; i < 6; i++ )
|
for( i = 0; i < 6; i++ )
|
||||||
{
|
{
|
||||||
// go into 3d mode
|
// go into 3d mode
|
||||||
|
@ -985,31 +985,6 @@ void R_RenderScene( void )
|
|||||||
R_EndGL();
|
R_EndGL();
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
===============
|
|
||||||
R_CheckGamma
|
|
||||||
===============
|
|
||||||
*/
|
|
||||||
void R_CheckGamma( void )
|
|
||||||
{
|
|
||||||
if( gEngfuncs.R_DoResetGamma( ))
|
|
||||||
{
|
|
||||||
// paranoia cubemaps uses this
|
|
||||||
gEngfuncs.BuildGammaTable( 1.8f, 0.0f );
|
|
||||||
|
|
||||||
// paranoia cubemap rendering
|
|
||||||
if( gEngfuncs.drawFuncs->GL_BuildLightmaps )
|
|
||||||
gEngfuncs.drawFuncs->GL_BuildLightmaps( );
|
|
||||||
}
|
|
||||||
else if( FBitSet( vid_gamma->flags, FCVAR_CHANGED ) || FBitSet( vid_brightness->flags, FCVAR_CHANGED ))
|
|
||||||
{
|
|
||||||
gEngfuncs.BuildGammaTable( vid_gamma->value, vid_brightness->value );
|
|
||||||
glConfig.softwareGammaUpdate = true;
|
|
||||||
GL_RebuildLightmaps();
|
|
||||||
glConfig.softwareGammaUpdate = false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
===============
|
===============
|
||||||
R_BeginFrame
|
R_BeginFrame
|
||||||
@ -1025,8 +1000,6 @@ void R_BeginFrame( qboolean clearScene )
|
|||||||
pglClear( GL_COLOR_BUFFER_BIT );
|
pglClear( GL_COLOR_BUFFER_BIT );
|
||||||
}
|
}
|
||||||
|
|
||||||
R_CheckGamma();
|
|
||||||
|
|
||||||
R_Set2DMode( true );
|
R_Set2DMode( true );
|
||||||
|
|
||||||
// draw buffer stuff
|
// draw buffer stuff
|
||||||
|
@ -3756,9 +3756,6 @@ void GL_RebuildLightmaps( void )
|
|||||||
if( !ENGINE_GET_PARM( PARM_CLIENT_ACTIVE ) )
|
if( !ENGINE_GET_PARM( PARM_CLIENT_ACTIVE ) )
|
||||||
return; // wait for worldmodel
|
return; // wait for worldmodel
|
||||||
|
|
||||||
ClearBits( vid_brightness->flags, FCVAR_CHANGED );
|
|
||||||
ClearBits( vid_gamma->flags, FCVAR_CHANGED );
|
|
||||||
|
|
||||||
// release old lightmaps
|
// release old lightmaps
|
||||||
for( i = 0; i < MAX_LIGHTMAPS; i++ )
|
for( i = 0; i < MAX_LIGHTMAPS; i++ )
|
||||||
{
|
{
|
||||||
@ -3874,10 +3871,6 @@ void GL_BuildLightmaps( void )
|
|||||||
// build lightmaps on the client-side
|
// build lightmaps on the client-side
|
||||||
gEngfuncs.drawFuncs->GL_BuildLightmaps( );
|
gEngfuncs.drawFuncs->GL_BuildLightmaps( );
|
||||||
}
|
}
|
||||||
|
|
||||||
// now gamma and brightness are valid
|
|
||||||
ClearBits( vid_brightness->flags, FCVAR_CHANGED );
|
|
||||||
ClearBits( vid_gamma->flags, FCVAR_CHANGED );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void GL_InitRandomTable( void )
|
void GL_InitRandomTable( void )
|
||||||
|
Loading…
x
Reference in New Issue
Block a user