]> git.rm.cloudns.org Git - xonotic/darkplaces.git/commitdiff
fix broken use of + and | in drawflags
authordivverent <divverent@d7cf8633-e32d-0410-b094-e92efae38249>
Mon, 20 Feb 2012 14:54:40 +0000 (14:54 +0000)
committerRudolf Polzer <divverent@alientrap.org>
Mon, 20 Feb 2012 19:32:29 +0000 (20:32 +0100)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@11707 d7cf8633-e32d-0410-b094-e92efae38249
::stable-branch::merge=93d7dc6abc91b90c5ee8787fc0f48eba37516d89

draw.h
gl_draw.c

diff --git a/draw.h b/draw.h
index 9b34dec14d02483102abd3ba04523119a0b8ce8f..1daa5eb0d45b602d7f3358789309a770652ec9b3 100644 (file)
--- a/draw.h
+++ b/draw.h
@@ -99,7 +99,7 @@ DRAWFLAG_MASK = 0xFF,   // ONLY R_BeginPolygon()
 DRAWFLAG_MIPMAP = 0x100, // ONLY R_BeginPolygon()
 DRAWFLAG_NOGAMMA = 0x200 // ONLY R_DrawQSuperPic()
 };
-#define DRAWFLAGS_BLEND (DRAWFLAG_ADDITIVE + DRAWFLAG_MODULATE + DRAWFLAG_2XMODULATE + DRAWFLAG_SCREEN)
+#define DRAWFLAGS_BLEND 0xFF /* this matches all blending flags */
 
 typedef struct ft2_settings_s
 {
index 189ddd18c0b03753cb293c87c4a9948ee29cceed..581ef1a22dc8c5fce5df2fab1f86c17e934a08e1 100644 (file)
--- a/gl_draw.c
+++ b/gl_draw.c
@@ -1931,10 +1931,10 @@ void DrawQ_SuperPic(float x, float y, cachepic_t *pic, float width, float height
                        width = pic->width;
                if (height == 0)
                        height = pic->height;
-               R_SetupShader_Generic(Draw_GetPicTexture(pic), NULL, GL_MODULATE, 1, (flags & (DRAWFLAGS_BLEND+DRAWFLAG_NOGAMMA)) ? false : true, true, false);
+               R_SetupShader_Generic(Draw_GetPicTexture(pic), NULL, GL_MODULATE, 1, (flags & (DRAWFLAGS_BLEND | DRAWFLAG_NOGAMMA)) ? false : true, true, false);
        }
        else
-               R_SetupShader_Generic_NoTexture((flags & (DRAWFLAGS_BLEND+DRAWFLAG_NOGAMMA)) ? false : true, true);
+               R_SetupShader_Generic_NoTexture((flags & (DRAWFLAGS_BLEND | DRAWFLAG_NOGAMMA)) ? false : true, true);
 
        floats[2] = floats[5] = floats[8] = floats[11] = 0;
        floats[0] = floats[9] = x;