diff --git a/glm/gtc/half_float.hpp b/glm/gtc/half_float.hpp index afca7b8b..91b75892 100644 --- a/glm/gtc/half_float.hpp +++ b/glm/gtc/half_float.hpp @@ -25,7 +25,7 @@ namespace glm namespace detail { -#ifndef GLM_USE_ANONYMOUS_UNION +#ifndef _MSC_EXTENSIONS template <> struct tvec2 { @@ -319,7 +319,7 @@ namespace glm tvec4 swizzle(comp X, comp Y, comp Z, comp W) const; tref4 swizzle(comp X, comp Y, comp Z, comp W); }; -#endif//GLM_USE_ANONYMOUS_UNION +#endif//_MSC_EXTENSIONS } //namespace detail diff --git a/glm/gtc/half_float.inl b/glm/gtc/half_float.inl index 96201b40..e57aebbf 100644 --- a/glm/gtc/half_float.inl +++ b/glm/gtc/half_float.inl @@ -10,7 +10,7 @@ namespace glm{ namespace detail{ -#ifndef GLM_USE_ANONYMOUS_UNION +#ifndef _MSC_EXTENSIONS ////////////////////////////////////// // hvec2 @@ -969,7 +969,7 @@ inline tref4 tvec4::swizzle(comp x, comp y, comp z, comp w) (*this)[w]); } -#endif//GLM_USE_ANONYMOUS_UNION +#endif//_MSC_EXTENSIONS }//namespace detail }//namespace glm diff --git a/glm/setup.hpp b/glm/setup.hpp index f10552d9..bc8c6b01 100644 --- a/glm/setup.hpp +++ b/glm/setup.hpp @@ -262,10 +262,12 @@ # define GLM_ARCH GLM_ARCH_PURE # endif #elif((GLM_COMPILER & GLM_COMPILER_GCC) && (defined(__i386__) || defined(__x86_64__))) -# if(GLM_COMPILER >= GLM_COMPILER_GCC44) +# if(defined(__AVX__)) # define GLM_ARCH GLM_ARCH_AVX -# elif(GLM_COMPILER >= GLM_COMPILER_GCC40) +# elif(defined(__SSE3__)) # define GLM_ARCH GLM_ARCH_SSE3 +# elif(defined(__SSE2__)) +# define GLM_ARCH GLM_ARCH_SSE2 # else # define GLM_ARCH GLM_ARCH_PURE # endif @@ -340,8 +342,10 @@ # define GLM_STATIC_ASSERT(x, message) static_assert(x, message) #elif(defined(BOOST_STATIC_ASSERT)) # define GLM_STATIC_ASSERT(x, message) BOOST_STATIC_ASSERT(x) -#else +#elif(GLM_COMPILER & GLM_COMPILER_VC) # define GLM_STATIC_ASSERT(x, message) typedef char __CASSERT__##__LINE__[(x) ? 1 : -1] +#else +# define GLM_STATIC_ASSERT(x, message) #endif//GLM_LANG /////////////////////////////////////////////////////////////////////////////////////////////////// diff --git a/test/core/core_type_half.cpp b/test/core/core_type_half.cpp index fbbb1a30..3468f357 100644 --- a/test/core/core_type_half.cpp +++ b/test/core/core_type_half.cpp @@ -19,12 +19,12 @@ int main() glm::half C = A + B; glm::half D(C); float E = D; - int F = C; + int F = float(C); glm::half G = B * C; glm::half H = G / C; H += glm::half(1.0f); double J = H; - int I = H; + int I = float(H); Result = Result && J == 3.0;