From: havoc Date: Fri, 6 Feb 2004 05:18:17 +0000 (+0000) Subject: increased size of ditherpattern texture to try to work around the odd 'not black... X-Git-Tag: xonotic-v0.1.0preview~6117 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=298b8dc57cd67c1373b64edef3ee97037fef0d7e;p=xonotic%2Fdarkplaces.git increased size of ditherpattern texture to try to work around the odd 'not black' dither bug (succeeded? yes, but no closer to figuring out why it was misbehaving in the first place) git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@3871 d7cf8633-e32d-0410-b094-e92efae38249 --- diff --git a/gl_draw.c b/gl_draw.c index 7ba2282e..8407edf2 100644 --- a/gl_draw.c +++ b/gl_draw.c @@ -197,10 +197,24 @@ static rtexture_t *draw_generatecrosshair(int num) static rtexture_t *draw_generateditherpattern(void) { +#if 1 + int x, y; + qbyte data[8*8*4]; + for (y = 0;y < 8;y++) + { + for (x = 0;x < 8;x++) + { + data[(y*8+x)*4+0] = data[(y*8+x)*4+1] = data[(y*8+x)*4+2] = ((x^y) & 4) ? 255 : 0; + data[(y*8+x)*4+3] = 255; + } + } + return R_LoadTexture2D(drawtexturepool, "ditherpattern", 8, 8, data, TEXTYPE_RGBA, TEXF_FORCENEAREST | TEXF_PRECACHE, NULL); +#else qbyte data[16]; memset(data, 255, sizeof(data)); data[0] = data[1] = data[2] = data[12] = data[13] = data[14] = 0; return R_LoadTexture2D(drawtexturepool, "ditherpattern", 2, 2, data, TEXTYPE_RGBA, TEXF_FORCENEAREST | TEXF_PRECACHE, NULL); +#endif } /*