From 60cc3dc65943de5d712388c8f5fe7ffdb217115d Mon Sep 17 00:00:00 2001 From: havoc Date: Wed, 4 Jan 2012 04:36:21 +0000 Subject: [PATCH] if vertex texture blending is used with a _glow texture, make sure both 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 --- gl_rmain.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/gl_rmain.c b/gl_rmain.c index 5a022805..5a3b3293 100644 --- a/gl_rmain.c +++ b/gl_rmain.c @@ -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 { -- 2.39.2