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
This commit is contained in:
helixhorned 2011-12-03 13:13:28 +00:00
parent 324510f40d
commit bbc6db465e
3 changed files with 8 additions and 4 deletions

View file

@ -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;

View file

@ -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,

View file

@ -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