]> git.xonotic.org Git - xonotic/darkplaces.git/commitdiff
small optimization to use of texture_t->currenttexmatrix (no longer
authorhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Wed, 28 Nov 2007 10:57:12 +0000 (10:57 +0000)
committerhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Wed, 28 Nov 2007 10:57:12 +0000 (10:57 +0000)
setting it to identitymatrix when there are no tcmods, because
uninitialized matrices are optimized more in the backend than identity)

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@7731 d7cf8633-e32d-0410-b094-e92efae38249

gl_rmain.c

index 2755fd51bb8be75661abab821ed09ff432baedf6..852ce37acb50f46b8cdc34852e5c2d37b26f04e9 100644 (file)
@@ -4065,7 +4065,7 @@ void R_UpdateTextureInfo(const entity_render_t *ent, texture_t *t)
        if (t->backgroundnumskinframes && !(t->currentmaterialflags & MATERIALFLAGMASK_DEPTHSORTED))
                t->currentmaterialflags |= MATERIALFLAG_VERTEXTEXTUREBLEND;
 
-       for (i = 0, tcmod = t->tcmods;i < Q3MAXTCMODS && (tcmod->tcmod || i < 1);i++, tcmod++)
+       for (i = 0, tcmod = t->tcmods;i < Q3MAXTCMODS && tcmod->tcmod;i++, tcmod++)
        {
                matrix4x4_t matrix;
                switch(tcmod->tcmod)