@@ -158,7 +158,8 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
158158 cvar_t *r_replaceMaterialMinDimensionIfPresentWithMaxDimension;
159159 Cvar::Range<Cvar::Cvar<int >> r_imageFitScreen (" r_imageFitScreen" , " downscale “fitscreen” images to fit the screen size: 0: disable, 1: downscale as much as possible without being smaller than screen size (default), 2: downscale to never be larger then screen size" , Cvar::NONE, 1 , 0 , 2 );
160160 cvar_t *r_finish;
161- cvar_t *r_textureMode;
161+ Cvar::Modified<Cvar::Cvar<std::string>> r_textureMode (
162+ " r_textureMode" , " default texture filter mode" , Cvar::NONE, " GL_LINEAR_MIPMAP_LINEAR" );
162163 cvar_t *r_offsetFactor;
163164 cvar_t *r_offsetUnits;
164165
@@ -830,8 +831,8 @@ ScreenshotCmd screenshotPNGRegistration("screenshotPNG", ssFormat_t::SSF_PNG, "p
830831
831832 tr.currenttextures .resize ( glConfig2.maxTextureUnits );
832833
833- GL_TextureMode ( r_textureMode-> string );
834- r_textureMode-> modified = false ;
834+ GL_TextureMode ( r_textureMode. Get (). c_str () );
835+ r_textureMode. GetModifiedValue () ;
835836
836837 GL_DepthFunc ( GL_LEQUAL );
837838
@@ -1067,7 +1068,7 @@ ScreenshotCmd screenshotPNGRegistration("screenshotPNG", ssFormat_t::SSF_PNG, "p
10671068 Log::Notice (" Forcing glFinish." );
10681069 }
10691070
1070- Log::Debug (" texturemode: %s" , r_textureMode-> string );
1071+ Log::Debug (" texturemode: %s" , r_textureMode. Get () );
10711072 Log::Debug (" picmip: %d" , r_picMip->integer );
10721073 Log::Debug (" imageMaxDimension: %d" , r_imageMaxDimension->integer );
10731074 Log::Debug (" ignoreMaterialMinDimension: %d" , r_ignoreMaterialMinDimension->integer );
@@ -1169,7 +1170,6 @@ ScreenshotCmd screenshotPNGRegistration("screenshotPNG", ssFormat_t::SSF_PNG, "p
11691170 r_zfar = Cvar_Get ( " r_zfar" , " 0" , CVAR_CHEAT );
11701171 r_checkGLErrors = Cvar_Get ( " r_checkGLErrors" , " -1" , 0 );
11711172 r_finish = Cvar_Get ( " r_finish" , " 0" , CVAR_CHEAT );
1172- r_textureMode = Cvar_Get ( " r_textureMode" , " GL_LINEAR_MIPMAP_LINEAR" , CVAR_ARCHIVE );
11731173 r_gamma = Cvar_Get ( " r_gamma" , " 1.0" , CVAR_ARCHIVE );
11741174 r_facePlaneCull = Cvar_Get ( " r_facePlaneCull" , " 1" , 0 );
11751175
0 commit comments