new flag CACHEPICFLAG_NOCLAMP; use it for R_PolygonBegin polygons
authordivverent <divverent@d7cf8633-e32d-0410-b094-e92efae38249>
Sun, 24 Aug 2008 15:03:26 +0000 (15:03 +0000)
committerdivverent <divverent@d7cf8633-e32d-0410-b094-e92efae38249>
Sun, 24 Aug 2008 15:03:26 +0000 (15:03 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@8475 d7cf8633-e32d-0410-b094-e92efae38249

clvm_cmds.c
draw.h
gl_draw.c
menu.c

index fb5a7e5..16c9ce8 100644 (file)
@@ -2586,7 +2586,7 @@ void VM_CL_R_PolygonBegin (void)
                return;
        }
        picname = PRVM_G_STRING(OFS_PARM0);
-       polys->begin_texture = picname[0] ? Draw_CachePic (picname)->tex : r_texture_white;
+       polys->begin_texture = picname[0] ? Draw_CachePic_Flags (picname, CACHEPICFLAG_NOCLAMP)->tex : r_texture_white;
        polys->begin_drawflag = (int)PRVM_G_FLOAT(OFS_PARM1);
        polys->begin_vertices = 0;
        polys->begin_active = true;
diff --git a/draw.h b/draw.h
index c4bf81d..8646c6a 100644 (file)
--- a/draw.h
+++ b/draw.h
@@ -43,6 +43,7 @@ typedef enum cachepicflags_e
        CACHEPICFLAG_NOTPERSISTENT = 1,
        CACHEPICFLAG_QUIET = 2,
        CACHEPICFLAG_NOCOMPRESSION = 4,
+       CACHEPICFLAG_NOCLAMP = 8,
 }
 cachepicflags_t;
 
index 655b31f..157ae42 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 (strcmp(path, "gfx/colorcontrol/ditherpattern"))
+       if (!(flags & CACHEPICFLAG_NOCLAMP))
                flags |= TEXF_CLAMP;
        if (!(cachepicflags & CACHEPICFLAG_NOCOMPRESSION) && gl_texturecompression_2d.integer)
                flags |= TEXF_COMPRESS;
diff --git a/menu.c b/menu.c
index 696f753..44b17df 100644 (file)
--- a/menu.c
+++ b/menu.c
@@ -2176,7 +2176,7 @@ static void M_Options_ColorControl_Draw (void)
        float x, c, s, t, u, v;
        cachepic_t      *p, *dither;
 
-       dither = Draw_CachePic ("gfx/colorcontrol/ditherpattern");
+       dither = Draw_CachePic_Flags ("gfx/colorcontrol/ditherpattern", CACHEPICFLAG_NOCLAMP);
 
        M_Background(320, 256);