From d028200bf1149a7cb2ce56d5def13c13aed1aa5f Mon Sep 17 00:00:00 2001 From: havoc Date: Tue, 10 Apr 2018 05:10:08 +0000 Subject: [PATCH] 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 --- gl_textures.c | 7 +++++++ 1 file changed, 7 insertions(+) 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) -- 2.39.2