Fixed GTX_compatibility on Android r7

This commit is contained in:
Christophe Riccio 2012-04-19 11:29:57 +01:00
parent ac768ea12b
commit 958bb6f6ca
2 changed files with 37 additions and 15 deletions

View File

@ -52,6 +52,9 @@
#include <cfloat>
#elif(GLM_COMPILER & GLM_COMPILER_GCC)
#include <cmath>
# if(GLM_PLATFORM & GLM_PLATFORM_ANDROID)
# undef isfinite
# endif
#endif//GLM_COMPILER
namespace glm

View File

@ -14,11 +14,18 @@ namespace glm
GLM_FUNC_QUALIFIER bool isfinite(
genType const & x)
{
#if(GLM_COMPILER & GLM_COMPILER_VC)
# if(GLM_COMPILER & GLM_COMPILER_VC)
return _finite(x);
#else//(GLM_COMPILER & GLM_COMPILER_GCC)
# elif(GLM_COMPILER & GLM_COMPILER_GCC)
# if(GLM_PLATFORM & GLM_PLATFORM_ANDROID)
return _isfinite(x) != 0;
# else
return std::isfinite(x) != 0;
#endif
# endif
# else
return std::isfinite(x) != 0;
# endif
}
template <typename valType>
@ -56,11 +63,17 @@ namespace glm
GLM_FUNC_QUALIFIER bool isinf(
genType const & x)
{
#if(GLM_COMPILER & GLM_COMPILER_VC)
# if(GLM_COMPILER & GLM_COMPILER_VC)
return _fpclass(x) == _FPCLASS_NINF || _fpclass(x) == _FPCLASS_PINF;
#else
# elif(GLM_COMPILER & GLM_COMPILER_GCC)
# if(GLM_PLATFORM & GLM_PLATFORM_ANDROID)
return _isinf(x) != 0;
# else
return std::isinf(x) != 0;
#endif
# endif
# else
return std::isinf(x) != 0;
# endif
}
template <typename valType>
@ -97,11 +110,17 @@ namespace glm
template <typename genType>
GLM_FUNC_QUALIFIER bool isnan(genType const & x)
{
#if(GLM_COMPILER & GLM_COMPILER_VC)
# if(GLM_COMPILER & GLM_COMPILER_VC)
return _isnan(x);
#else
# elif(GLM_COMPILER & GLM_COMPILER_GCC)
# if(GLM_PLATFORM & GLM_PLATFORM_ANDROID)
return _isnan(x) != 0;
# else
return std::isnan(x) != 0;
#endif
# endif
# else
return std::isnan(x) != 0;
# endif
}
template <typename valType>