]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - gl_rmain.c
if vertex texture blending is used with a _glow texture, make sure both
[xonotic/darkplaces.git] / 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
        {