From c366e25a10a6b462059f321ba53294716e9f4503 Mon Sep 17 00:00:00 2001 From: SNMetamorph <25657591+SNMetamorph@users.noreply.github.com> Date: Mon, 22 Nov 2021 13:42:16 +0400 Subject: [PATCH] ref_gl: cvar gl_wgl_msaa_samples renamed to gl_msaa_samples --- engine/client/ref_common.c | 4 ++-- engine/client/vid_common.h | 2 +- engine/platform/sdl/vid_sdl.c | 4 ++-- ref_gl/gl_opengl.c | 6 +++--- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/engine/client/ref_common.c b/engine/client/ref_common.c index da474089..63d937db 100644 --- a/engine/client/ref_common.c +++ b/engine/client/ref_common.c @@ -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" ); diff --git a/engine/client/vid_common.h b/engine/client/vid_common.h index 7adef525..1014419e 100644 --- a/engine/client/vid_common.h +++ b/engine/client/vid_common.h @@ -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 ); diff --git a/engine/platform/sdl/vid_sdl.c b/engine/platform/sdl/vid_sdl.c index d31337d5..12b99732 100644 --- a/engine/platform/sdl/vid_sdl.c +++ b/engine/platform/sdl/vid_sdl.c @@ -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 diff --git a/ref_gl/gl_opengl.c b/ref_gl/gl_opengl.c index 9c5f2545..eb3025c9 100644 --- a/ref_gl/gl_opengl.c +++ b/ref_gl/gl_opengl.c @@ -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" ); } }