From: havoc Date: Sun, 23 Jan 2011 15:57:55 +0000 (+0000) Subject: added support for disabling mipmapping using the non-MIPMAP filters X-Git-Tag: xonotic-v0.5.0~438^2~113 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=aaf4bd803e1af0af6175fcd4702868afc2792d9f;p=xonotic%2Fdarkplaces.git added support for disabling mipmapping using the non-MIPMAP filters git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@10728 d7cf8633-e32d-0410-b094-e92efae38249 --- diff --git a/dpsoftrast.c b/dpsoftrast.c index d8b6aa0c..b3db5d01 100644 --- a/dpsoftrast.c +++ b/dpsoftrast.c @@ -2247,6 +2247,11 @@ void DPSOFTRAST_Draw_ProcessTriangles(int firstvertex, int numvertices, int numt texture = dpsoftrast.texbound[j]; if (texture) { + if (texture->filter <= DPSOFTRAST_TEXTURE_FILTER_LINEAR) + { + mip[j] = 0; + continue; + } // FIXME: use appropriate array for this texture! mip_edge0tc[0] = (clipped[DPSOFTRAST_ARRAY_TEXCOORD0][0][0] - clipped[DPSOFTRAST_ARRAY_TEXCOORD0][1][0]) * texture->mipmap[0][2]; mip_edge0tc[1] = (clipped[DPSOFTRAST_ARRAY_TEXCOORD0][0][1] - clipped[DPSOFTRAST_ARRAY_TEXCOORD0][1][1]) * texture->mipmap[0][3];