mirror of
https://github.com/Shpoike/Quakespasm.git
synced 2025-02-02 22:11:22 +00:00
apply anisotropic level setting only to mipmap textures
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@638 af15c1b1-3010-417e-b628-4374ebc0bcbd
This commit is contained in:
parent
b1afe294f2
commit
4f9ac636cc
3 changed files with 12 additions and 6 deletions
|
@ -107,14 +107,13 @@ static void TexMgr_SetFilterModes (gltexture_t *glt)
|
|||
{
|
||||
glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, glmodes[glmode_idx].magfilter);
|
||||
glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, glmodes[glmode_idx].minfilter);
|
||||
glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAX_ANISOTROPY_EXT, gl_texture_anisotropy.value);
|
||||
}
|
||||
else
|
||||
{
|
||||
glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, glmodes[glmode_idx].magfilter);
|
||||
glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, glmodes[glmode_idx].magfilter);
|
||||
}
|
||||
|
||||
glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAX_ANISOTROPY_EXT, gl_texture_anisotropy.value);
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -182,7 +181,15 @@ static void TexMgr_Anisotropy_f (cvar_t *var)
|
|||
{
|
||||
gltexture_t *glt;
|
||||
for (glt = active_gltextures; glt; glt = glt->next)
|
||||
TexMgr_SetFilterModes (glt);
|
||||
{
|
||||
/* TexMgr_SetFilterModes (glt);*/
|
||||
if (glt->flags & TEXPREF_MIPMAP) {
|
||||
GL_Bind (glt);
|
||||
glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, glmodes[glmode_idx].magfilter);
|
||||
glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, glmodes[glmode_idx].minfilter);
|
||||
glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAX_ANISOTROPY_EXT, gl_texture_anisotropy.value);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -25,10 +25,11 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|||
|
||||
#define TEXPREF_NONE 0x0000
|
||||
#define TEXPREF_MIPMAP 0x0001 // generate mipmaps
|
||||
// TEXPREF_NEAREST and TEXPREF_LINEAR aren't supposed to be ORed with TEX_MIPMAP
|
||||
#define TEXPREF_LINEAR 0x0002 // force linear
|
||||
#define TEXPREF_NEAREST 0x0004 // force nearest
|
||||
#define TEXPREF_ALPHA 0x0008 // allow alpha
|
||||
#define TEXPREF_PAD 0x0010 // allow padding
|
||||
#define TEXPREF_PAD 0x0010 // allow padding
|
||||
#define TEXPREF_PERSIST 0x0020 // never free
|
||||
#define TEXPREF_OVERWRITE 0x0040 // overwrite existing same-name texture
|
||||
#define TEXPREF_NOPICMIP 0x0080 // always load full-sized
|
||||
|
|
|
@ -301,8 +301,6 @@ int hunk_high_used;
|
|||
qboolean hunk_tempactive;
|
||||
int hunk_tempmark;
|
||||
|
||||
void R_FreeTextures (void);
|
||||
|
||||
/*
|
||||
==============
|
||||
Hunk_Check
|
||||
|
|
Loading…
Reference in a new issue