]> git.rm.cloudns.org Git - xonotic/darkplaces.git/commitdiff
if vertex texture blending is used with a _glow texture, make sure both
authorhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Wed, 4 Jan 2012 04:36:21 +0000 (04:36 +0000)
committerRudolf Polzer <divverent@alientrap.org>
Mon, 9 Jan 2012 11:16:02 +0000 (12:16 +0100)
layers have a valid _glow texture to render with (otherwise substitute
black in their place)

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@11634 d7cf8633-e32d-0410-b094-e92efae38249
::stable-branch::merge=60cc3dc65943de5d712388c8f5fe7ffdb217115d

gl_rmain.c

index 5a0228058b10a3a5b2ff6b7a660272aac4a80c47..5a3b32932f4458541e0449c7f52d2485c29c0820 100644 (file)
@@ -7891,6 +7891,11 @@ texture_t *R_GetCurrentTexture(texture_t *t)
                t->backgroundglowtexture = t->backgroundcurrentskinframe->glow;
                if (!t->backgroundnmaptexture)
                        t->backgroundnmaptexture = r_texture_blanknormalmap;
+               // make sure that if glow is going to be used, both textures are not NULL
+               if (!t->backgroundglowtexture && t->glowtexture)
+                       t->backgroundglowtexture = r_texture_black;
+               if (!t->glowtexture && t->backgroundglowtexture)
+                       t->glowtexture = r_texture_black;
        }
        else
        {