Browse Source

ref_gl: cvar gl_wgl_msaa_samples renamed to gl_msaa_samples

pull/2/head
SNMetamorph 3 years ago committed by a1batross
parent
commit
c366e25a10
  1. 4
      engine/client/ref_common.c
  2. 2
      engine/client/vid_common.h
  3. 4
      engine/platform/sdl/vid_sdl.c
  4. 6
      ref_gl/gl_opengl.c

4
engine/client/ref_common.c

@ -13,7 +13,7 @@ convar_t *gl_showtextures;
convar_t *r_decals; convar_t *r_decals;
convar_t *r_adjust_fov; convar_t *r_adjust_fov;
convar_t *r_showtree; convar_t *r_showtree;
convar_t *gl_wgl_msaa_samples; convar_t *gl_msaa_samples;
convar_t *gl_clear; convar_t *gl_clear;
convar_t *r_refdll; 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" ); 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_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" ); 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" ); 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_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" ); r_refdll = Cvar_Get( "r_refdll", "", FCVAR_RENDERINFO|FCVAR_VIDRESTART, "choose renderer implementation, if supported" );

2
engine/client/vid_common.h

@ -36,7 +36,7 @@ extern convar_t *vid_highdpi;
extern convar_t *vid_rotate; extern convar_t *vid_rotate;
extern convar_t *vid_scale; 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 R_SaveVideoMode( int w, int h, int render_w, int render_h );
void VID_CheckChanges( void ); void VID_CheckChanges( void );
const char *VID_GetModeString( int vid_mode ); const char *VID_GetModeString( int vid_mode );

4
engine/platform/sdl/vid_sdl.c

@ -662,7 +662,7 @@ qboolean VID_CreateWindow( int width, int height, qboolean fullscreen )
glw_state.safe++; 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 glw_state.safe++; // no need to skip msaa, if we already disabled it
GL_SetupAttributes(); // re-choose attributes GL_SetupAttributes(); // re-choose attributes
@ -805,7 +805,7 @@ qboolean VID_CreateWindow( int width, int height, qboolean fullscreen )
glw_state.safe++; 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 glw_state.safe++; // no need to skip msaa, if we already disabled it
GL_SetupAttributes(); // re-choose attributes GL_SetupAttributes(); // re-choose attributes

6
ref_gl/gl_opengl.c

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

Loading…
Cancel
Save