]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - gl_draw.c
add DRAWFLAG_SCREEN (which basically is like invert-modulate-invert, equivalent to...
[xonotic/darkplaces.git] / gl_draw.c
index 157ae425cd440d671c94d9f6c38720d4502f11f8..9d3d47b531deb7b14b87d4b978717657f6f6223f 100644 (file)
--- a/gl_draw.c
+++ b/gl_draw.c
@@ -452,7 +452,7 @@ cachepic_t *Draw_CachePic_Flags(const char *path, unsigned int cachepicflags)
        flags = TEXF_ALPHA;
        if (!(cachepicflags & CACHEPICFLAG_NOTPERSISTENT))
                flags |= TEXF_PRECACHE;
-       if (!(flags & CACHEPICFLAG_NOCLAMP))
+       if (!(cachepicflags & CACHEPICFLAG_NOCLAMP))
                flags |= TEXF_CLAMP;
        if (!(cachepicflags & CACHEPICFLAG_NOCOMPRESSION) && gl_texturecompression_2d.integer)
                flags |= TEXF_COMPRESS;
@@ -813,6 +813,8 @@ static void _DrawQ_ProcessDrawFlag(int flags)
                GL_BlendFunc(GL_DST_COLOR, GL_ZERO);
        else if(flags == DRAWFLAG_2XMODULATE)
                GL_BlendFunc(GL_DST_COLOR,GL_SRC_COLOR);
+       else if(flags == DRAWFLAG_SCREEN)
+               GL_BlendFunc(GL_ONE_MINUS_DST_COLOR,GL_ONE);
        else
                GL_BlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
 }