]> git.rm.cloudns.org Git - xonotic/darkplaces.git/commitdiff
fix log(2) compile error as C++, should have been log(2.0f)
authorhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Sun, 23 Jan 2011 17:08:47 +0000 (17:08 +0000)
committerhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Sun, 23 Jan 2011 17:08:47 +0000 (17:08 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@10733 d7cf8633-e32d-0410-b094-e92efae38249

dpsoftrast.c

index 014dc60decf9b902bce2540493b3b57731b4a472..602bf113a91abeedfe099a00861dfcb290796090 100644 (file)
@@ -2364,7 +2364,7 @@ void DPSOFTRAST_Draw_ProcessTriangles(int firstvertex, int numvertices, int numt
                                mip_edge1mip = (mip_edge1tc[0]*mip_edge1tc[0]+mip_edge1tc[1]*mip_edge1tc[1]) * mip_edge1xymul;
                                // this will be multiplied in the texturing routine by the texture resolution
                                mipdensity = mip_edge0mip < mip_edge1mip ? mip_edge0mip : mip_edge1mip;
-                               y = (int)(log(mipdensity)/log(2) + 0.5f);
+                               y = (int)(log(mipdensity)/log(2.0f) + 0.5f);
                                if (y < 0)
                                        y = 0;
                                if (y > texture->mipmaps - 1)