瀏覽代碼

Replaced log2() function by equivalent

log2() is not available in some standard C library implementations
pull/207/head
Ray 9 年之前
父節點
當前提交
d5c0f9d386
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. +1
    -1
      src/rlgl.c

+ 1
- 1
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);

Loading…
取消
儲存