diff options
author | Ferenc Arn <tagcup@yahoo.com> | 2017-04-26 10:49:08 -0500 |
---|---|---|
committer | Ferenc Arn <tagcup@yahoo.com> | 2017-05-31 18:59:00 -0500 |
commit | 6a9c990da72a737fa95d9e97d53f835706aea7c3 (patch) | |
tree | 0f5c1d36279bef5d0d5c84fc1d3fb24256b65ba8 /core/math | |
parent | bd26fa7bf2bf02f9ef17ad4ef3a93ffed3ffcf56 (diff) | |
download | redot-engine-6a9c990da72a737fa95d9e97d53f835706aea7c3.tar.gz |
Add ETC1/ETC2 compression support though etc2comp.
Remove rg-etc1 code. Also updated travis to use ubuntu 14.04.
Fixes #8457.
Diffstat (limited to 'core/math')
-rw-r--r-- | core/math/math_funcs.h | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/core/math/math_funcs.h b/core/math/math_funcs.h index 6a5e12c3ce..440d989705 100644 --- a/core/math/math_funcs.h +++ b/core/math/math_funcs.h @@ -112,6 +112,15 @@ public: static _ALWAYS_INLINE_ bool is_inf(double p_val) { #ifdef _MSC_VER return !_finite(p_val); +// workaround for mingw builds on travis +#elif defined(__MINGW32__) || defined(__MINGW64__) + union { + uint64_t u; + double f; + } ieee754; + ieee754.f = p_val; + return ((unsigned)(ieee754.u >> 32) & 0x7fffffff) == 0x7ff00000 && + ((unsigned)ieee754.u == 0); #else return isinf(p_val); #endif @@ -120,6 +129,14 @@ public: static _ALWAYS_INLINE_ bool is_inf(float p_val) { #ifdef _MSC_VER return !_finite(p_val); +// workaround for mingw builds on travis +#elif defined(__MINGW32__) || defined(__MINGW64__) + union { + uint32_t u; + float f; + } ieee754; + ieee754.f = p_val; + return (ieee754.u & 0x7fffffff) == 0x7f800000; #else return isinf(p_val); #endif |