From bbc6db465e8299eeb16866da6c67ff47820a891f Mon Sep 17 00:00:00 2001 From: helixhorned Date: Sat, 3 Dec 2011 13:13:28 +0000 Subject: [PATCH] Mapster32: new cfg var 'glusememcache', the same as r_memcache cvar. git-svn-id: https://svn.eduke32.com/eduke32@2145 1a8010ca-5511-0410-912e-c29ae57300e0 --- polymer/eduke32/build/include/build.h | 2 +- polymer/eduke32/build/src/config.c | 7 ++++++- polymer/eduke32/build/src/polymost.c | 3 +-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/polymer/eduke32/build/include/build.h b/polymer/eduke32/build/include/build.h index c4bdb6ff0..b7a8176a1 100644 --- a/polymer/eduke32/build/include/build.h +++ b/polymer/eduke32/build/include/build.h @@ -722,7 +722,7 @@ extern int32_t glanisotropy; extern int32_t glusetexcompr; extern int32_t gltexfiltermode; extern int32_t glredbluemode; -extern int32_t glusetexcache; +extern int32_t glusetexcache, glusememcache; extern int32_t glmultisample, glnvmultisamplehint; extern int32_t glwidescreen, glprojectionhacks; extern int32_t gltexmaxsize; diff --git a/polymer/eduke32/build/src/config.c b/polymer/eduke32/build/src/config.c index e5cd1fa1b..acae71464 100644 --- a/polymer/eduke32/build/src/config.c +++ b/polymer/eduke32/build/src/config.c @@ -176,6 +176,10 @@ int32_t loadsetup(const char *fn) { glusetexcache = clamp(atoi_safe(val), 0, 2); } + if (readconfig(fp, "glusememcache", val, VL) > 0) + { + glusememcache = !!atoi_safe(val); + } if (readconfig(fp, "gltexfiltermode", val, VL) > 0) { gltexfiltermode = atoi_safe(val); @@ -385,6 +389,7 @@ int32_t writesetup(const char *fn) "; glusetexcache: 0:no, 1:yes, 2:compressed\n" "; For best performance, keep this setting in sync with EDuke32\n" "glusetexcache = %d\n" + "glusememcache = %d\n" "gltexfiltermode = %d\n" "glanisotropy = %d\n" "r_downsize = %d\n" @@ -561,7 +566,7 @@ int32_t writesetup(const char *fn) editorgridextent, clamp(default_grid, 0, 9), #ifdef USE_OPENGL usemodels, usehightile, g_lazy_tileselector, - glusetexcache, gltexfiltermode, glanisotropy,r_downsize,glusetexcompr, + glusetexcache, glusememcache, gltexfiltermode, glanisotropy,r_downsize,glusetexcompr, shadescale, #endif r_usenewaspect, r_screenxy, diff --git a/polymer/eduke32/build/src/polymost.c b/polymer/eduke32/build/src/polymost.c index b3cd48a58..afcb5d805 100644 --- a/polymer/eduke32/build/src/polymost.c +++ b/polymer/eduke32/build/src/polymost.c @@ -153,8 +153,7 @@ struct glfiltermodes glfiltermodes[numglfiltermodes] = int32_t glanisotropy = 1; // 0 = maximum supported by card int32_t glusetexcompr = 1; int32_t gltexfiltermode = 2; // GL_NEAREST_MIPMAP_NEAREST -int32_t glusetexcache = 2; -static int32_t glusememcache = 1; +int32_t glusetexcache = 2, glusememcache = 1; int32_t glmultisample = 0, glnvmultisamplehint = 0; int32_t gltexmaxsize = 0; // 0 means autodetection on first run int32_t gltexmiplevel = 0; // discards this many mipmap levels