From 6a9c990da72a737fa95d9e97d53f835706aea7c3 Mon Sep 17 00:00:00 2001 From: Ferenc Arn Date: Wed, 26 Apr 2017 10:49:08 -0500 Subject: Add ETC1/ETC2 compression support though etc2comp. Remove rg-etc1 code. Also updated travis to use ubuntu 14.04. Fixes #8457. --- core/math/math_funcs.h | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'core/math') 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 -- cgit v1.2.3