]> git.rm.cloudns.org Git - xonotic/darkplaces.git/commitdiff
Don't bother setting anisotropy on textures twice during startup.
authorhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Tue, 10 Apr 2018 05:10:08 +0000 (05:10 +0000)
committerhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Tue, 10 Apr 2018 05:10:08 +0000 (05:10 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12382 d7cf8633-e32d-0410-b094-e92efae38249

gl_textures.c

index 14685e7949e1fe87a5b4fec166c3749f26bf6812..29d325ed68763bc7c0792b3e32fc80b443caab2c 100644 (file)
@@ -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)