From d5c0f9d3867887f86d754a031c7572ca76dcffd9 Mon Sep 17 00:00:00 2001 From: Ray Date: Fri, 9 Dec 2016 10:15:44 +0100 Subject: [PATCH] Replaced log2() function by equivalent log2() is not available in some standard C library implementations --- src/rlgl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/rlgl.c b/src/rlgl.c index 83cc7050f..c694dcdca 100644 --- a/src/rlgl.c +++ b/src/rlgl.c @@ -1780,7 +1780,7 @@ void rlglGenerateMipmaps(Texture2D *texture) #define MIN(a,b) (((a)<(b))?(a):(b)) #define MAX(a,b) (((a)>(b))?(a):(b)) - texture->mipmaps = 1 + (int)floor(log2(MAX(texture->width, texture->height))); + texture->mipmaps = 1 + (int)floor(log(MAX(texture->width, texture->height))/log(2)); #endif } else TraceLog(WARNING, "[TEX ID %i] Mipmaps can not be generated", texture->id);