From: havoc Date: Wed, 4 Jan 2012 04:36:21 +0000 (+0000) Subject: if vertex texture blending is used with a _glow texture, make sure both X-Git-Tag: xonotic-v0.6.0~82 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=0f5348cd38a7e1e4b3b3d97cd7372b68c0ed0113;p=xonotic%2Fdarkplaces.git 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 ::stable-branch::merge=60cc3dc65943de5d712388c8f5fe7ffdb217115d --- 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 {