From: havoc Date: Tue, 10 Apr 2018 05:10:08 +0000 (+0000) Subject: Don't bother setting anisotropy on textures twice during startup. X-Git-Tag: xonotic-v0.8.5~22 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=d028200bf1149a7cb2ce56d5def13c13aed1aa5f;p=xonotic%2Fdarkplaces.git Don't bother setting anisotropy on textures twice during startup. git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12382 d7cf8633-e32d-0410-b094-e92efae38249 ::stable-branch::merge=4ae7fe612c11a83d43b3720b6ca870bbcce31399 --- diff --git a/gl_textures.c b/gl_textures.c index 14685e79..29d325ed 100644 --- a/gl_textures.c +++ b/gl_textures.c @@ -996,6 +996,7 @@ void R_Textures_Frame (void) { #ifdef GL_TEXTURE_MAX_ANISOTROPY_EXT static int old_aniso = 0; + static qboolean first_time_aniso = true; #endif // could do procedural texture animation here, if we keep track of which @@ -1032,6 +1033,12 @@ void R_Textures_Frame (void) case RENDERPATH_GL20: case RENDERPATH_GLES1: case RENDERPATH_GLES2: + // ignore the first difference, any textures loaded by now probably had the same aniso value + if (first_time_aniso) + { + first_time_aniso = false; + break; + } CHECKGLERROR GL_ActiveTexture(0); for (pool = gltexturepoolchain;pool;pool = pool->next)