add GetMipLevel functions.
This commit is contained in:
parent
180228d46a
commit
0f3ef7ff3f
@ -472,6 +472,21 @@ namespace hgl
|
|||||||
return(value);
|
return(value);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
inline const uint GetMipLevel(const uint size)
|
||||||
|
{
|
||||||
|
return static_cast<uint>(floor(log2(size)))+1;
|
||||||
|
}
|
||||||
|
|
||||||
|
inline const uint GetMipLevel(const uint width,const uint height)
|
||||||
|
{
|
||||||
|
return GetMipLevel(hgl_max(width,height));
|
||||||
|
}
|
||||||
|
|
||||||
|
inline const uint GetMipLevel(const uint width,const uint height,const uint depth)
|
||||||
|
{
|
||||||
|
return GetMipLevel(hgl_max(hgl_max(width,height),depth));
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 角度转弧度
|
* 角度转弧度
|
||||||
*/
|
*/
|
||||||
|
Loading…
x
Reference in New Issue
Block a user