mirror of
https://github.com/bkaradzic/bgfx.git
synced 2026-02-20 13:53:14 +01:00
bx math API cleanup.
This commit is contained in:
@@ -450,7 +450,7 @@ namespace bgfx
|
||||
if (_hasMips)
|
||||
{
|
||||
const uint32_t max = bx::uint32_max(bx::uint32_max(_width, _height), _depth);
|
||||
const uint32_t num = 1 + uint32_t(bx::flog2(float(max) ) );
|
||||
const uint32_t num = 1 + uint32_t(bx::log2(float(max) ) );
|
||||
|
||||
return uint8_t(num);
|
||||
}
|
||||
@@ -4299,7 +4299,7 @@ namespace bgfx
|
||||
|
||||
BGFX_API_FUNC(void setViewClear(ViewId _id, uint16_t _flags, uint32_t _rgba, float _depth, uint8_t _stencil) )
|
||||
{
|
||||
BX_CHECK(bx::fequal(_depth, bx::clamp(_depth, 0.0f, 1.0f), 0.0001f)
|
||||
BX_CHECK(bx::equal(_depth, bx::clamp(_depth, 0.0f, 1.0f), 0.0001f)
|
||||
, "Clear depth value must be between 0.0 and 1.0 (_depth %f)."
|
||||
, _depth
|
||||
);
|
||||
@@ -4309,7 +4309,7 @@ namespace bgfx
|
||||
|
||||
BGFX_API_FUNC(void setViewClear(ViewId _id, uint16_t _flags, float _depth, uint8_t _stencil, uint8_t _0, uint8_t _1, uint8_t _2, uint8_t _3, uint8_t _4, uint8_t _5, uint8_t _6, uint8_t _7) )
|
||||
{
|
||||
BX_CHECK(bx::fequal(_depth, bx::clamp(_depth, 0.0f, 1.0f), 0.0001f)
|
||||
BX_CHECK(bx::equal(_depth, bx::clamp(_depth, 0.0f, 1.0f), 0.0001f)
|
||||
, "Clear depth value must be between 0.0 and 1.0 (_depth %f)."
|
||||
, _depth
|
||||
);
|
||||
|
||||
@@ -1469,7 +1469,7 @@ namespace bgfx { namespace gl
|
||||
if (_array)
|
||||
{
|
||||
glTexStorage3D(target
|
||||
, 1 + GLsizei(bx::flog2(float(_dim) ) )
|
||||
, 1 + GLsizei(bx::log2(float(_dim) ) )
|
||||
, internalFmt
|
||||
, _dim
|
||||
, _dim
|
||||
|
||||
@@ -253,7 +253,7 @@ namespace bgfx
|
||||
{
|
||||
float tmp[3];
|
||||
bx::vec3Sub(tmp, _pos, vertexPos(_vertices, _stride, _index) );
|
||||
return bx::fsqrt(bx::vec3Dot(tmp, tmp) );
|
||||
return bx::sqrt(bx::vec3Dot(tmp, tmp) );
|
||||
}
|
||||
|
||||
typedef float (*KeyFn)(float, float, float);
|
||||
|
||||
Reference in New Issue
Block a user