]> git.xonotic.org Git - xonotic/darkplaces.git/commitdiff
added support for disabling mipmapping using the non-MIPMAP filters
authorhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Sun, 23 Jan 2011 15:57:55 +0000 (15:57 +0000)
committerhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Sun, 23 Jan 2011 15:57:55 +0000 (15:57 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@10728 d7cf8633-e32d-0410-b094-e92efae38249

dpsoftrast.c

index d8b6aa0c394c728f6867c01847bf0e0ed9052cc5..b3db5d01698f2c6b9846b12dc5da4dfa32c63de1 100644 (file)
@@ -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];