ref_gl: cvar gl_wgl_msaa_samples renamed to gl_msaa_samples

This commit is contained in:
SNMetamorph 2021-11-22 13:42:16 +04:00 committed by a1batross
parent 8ab97fbbf0
commit c366e25a10
4 changed files with 8 additions and 8 deletions

View File

@ -13,7 +13,7 @@ convar_t *gl_showtextures;
convar_t *r_decals;
convar_t *r_adjust_fov;
convar_t *r_showtree;
convar_t *gl_wgl_msaa_samples;
convar_t *gl_msaa_samples;
convar_t *gl_clear;
convar_t *r_refdll;
@ -642,7 +642,7 @@ qboolean R_Init( void )
gl_showtextures = Cvar_Get( "r_showtextures", "0", FCVAR_CHEAT, "show all uploaded textures" );
r_adjust_fov = Cvar_Get( "r_adjust_fov", "1", FCVAR_ARCHIVE, "making FOV adjustment for wide-screens" );
r_decals = Cvar_Get( "r_decals", "4096", FCVAR_ARCHIVE, "sets the maximum number of decals" );
gl_wgl_msaa_samples = Cvar_Get( "gl_wgl_msaa_samples", "0", FCVAR_GLCONFIG, "samples number for multisample anti-aliasing" );
gl_msaa_samples = Cvar_Get( "gl_msaa_samples", "0", FCVAR_GLCONFIG, "samples number for multisample anti-aliasing" );
gl_clear = Cvar_Get( "gl_clear", "0", FCVAR_ARCHIVE, "clearing screen after each frame" );
r_showtree = Cvar_Get( "r_showtree", "0", FCVAR_ARCHIVE, "build the graph of visible BSP tree" );
r_refdll = Cvar_Get( "r_refdll", "", FCVAR_RENDERINFO|FCVAR_VIDRESTART, "choose renderer implementation, if supported" );

View File

@ -36,7 +36,7 @@ extern convar_t *vid_highdpi;
extern convar_t *vid_rotate;
extern convar_t *vid_scale;
extern convar_t *gl_wgl_msaa_samples;
extern convar_t *gl_msaa_samples;
void R_SaveVideoMode( int w, int h, int render_w, int render_h );
void VID_CheckChanges( void );
const char *VID_GetModeString( int vid_mode );

View File

@ -662,7 +662,7 @@ qboolean VID_CreateWindow( int width, int height, qboolean fullscreen )
glw_state.safe++;
if( !gl_wgl_msaa_samples->value && glw_state.safe == SAFE_NOMSAA )
if( !gl_msaa_samples->value && glw_state.safe == SAFE_NOMSAA )
glw_state.safe++; // no need to skip msaa, if we already disabled it
GL_SetupAttributes(); // re-choose attributes
@ -805,7 +805,7 @@ qboolean VID_CreateWindow( int width, int height, qboolean fullscreen )
glw_state.safe++;
if( !gl_wgl_msaa_samples->value && glw_state.safe == SAFE_NOMSAA )
if( !gl_msaa_samples->value && glw_state.safe == SAFE_NOMSAA )
glw_state.safe++; // no need to skip msaa, if we already disabled it
GL_SetupAttributes(); // re-choose attributes

View File

@ -1142,13 +1142,13 @@ void GL_SetupAttributes( int safegl )
if( safegl < SAFE_NOMSAA )
{
switch( (int)gEngfuncs.pfnGetCvarFloat( "gl_wgl_msaa_samples" ))
switch( (int)gEngfuncs.pfnGetCvarFloat( "gl_msaa_samples" ))
{
case 2:
case 4:
case 8:
case 16:
samples = gEngfuncs.pfnGetCvarFloat( "gl_wgl_msaa_samples" );
samples = gEngfuncs.pfnGetCvarFloat( "gl_msaa_samples" );
break;
default:
samples = 0; // don't use, because invalid parameter is passed
@ -1171,7 +1171,7 @@ void GL_SetupAttributes( int safegl )
}
else
{
gEngfuncs.Cvar_Set( "gl_wgl_msaa_samples", "0" );
gEngfuncs.Cvar_Set( "gl_msaa_samples", "0" );
}
}