]> git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - dpsoftrast.c
fix log(2) compile error as C++, should have been log(2.0f)
[xonotic/darkplaces.git] / 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)