diff --git a/glm/core/dummy.cpp b/glm/core/dummy.cpp index d6abc261..695af54b 100644 --- a/glm/core/dummy.cpp +++ b/glm/core/dummy.cpp @@ -29,6 +29,7 @@ /// dummy.cpp exist only a wordaround for CMake file. /////////////////////////////////////////////////////////////////////////////////// +#define GLM_MESSAGES #include "../glm.hpp" #include "../ext.hpp" diff --git a/glm/core/setup.hpp b/glm/core/setup.hpp index 7b40eb28..10c7a0e4 100644 --- a/glm/core/setup.hpp +++ b/glm/core/setup.hpp @@ -320,14 +320,18 @@ # define GLM_LANG GLM_LANG_CXX03 #elif(defined(GLM_FORCE_CXX98)) # define GLM_LANG GLM_LANG_CXX98 -#elif(((GLM_COMPILER & GLM_COMPILER_GCC) == GLM_COMPILER_GCC) && defined(__GXX_EXPERIMENTAL_CXX0X__)) // -std=c++0x or -std=gnu++0x -# define GLM_LANG GLM_LANG_CXX0X -#elif(GLM_COMPILER == GLM_COMPILER_VC2010) //_MSC_EXTENSIONS for MS language extensions -# define GLM_LANG GLM_LANG_CXX0X #elif(((GLM_COMPILER & GLM_COMPILER_GCC) == GLM_COMPILER_GCC) && defined(__STRICT_ANSI__)) # define GLM_LANG GLM_LANG_CXX98 +#elif(((GLM_COMPILER & GLM_COMPILER_GCC) == GLM_COMPILER_GCC) && defined(__GXX_EXPERIMENTAL_CXX0X__)) // -std=c++0x or -std=gnu++0x +# define GLM_LANG GLM_LANG_CXX0X +#elif(((GLM_COMPILER & GLM_COMPILER_VC) == GLM_COMPILER_VC) && defined(_MSC_EXTENSIONS)) +# define GLM_LANG GLM_LANG_CXXMS #elif(((GLM_COMPILER & GLM_COMPILER_VC) == GLM_COMPILER_VC) && !defined(_MSC_EXTENSIONS)) -# define GLM_LANG GLM_LANG_CXX98 +# if(GLM_COMPILER >= GLM_COMPILER_VC2010) +# define GLM_LANG GLM_LANG_CXX0X +# else +# define GLM_LANG GLM_LANG_CXX98 +# endif//(GLM_COMPILER == GLM_COMPILER_VC2010) #else # define GLM_LANG GLM_LANG_CXX #endif @@ -342,6 +346,10 @@ # pragma message("GLM: C++0x") # elif(GLM_LANG == GLM_LANG_CXX11) # pragma message("GLM: C++11") +# elif(GLM_LANG == GLM_LANG_CXXGNU) +# pragma message("GLM: C++ with GNU language extensions") +# elif(GLM_LANG == GLM_LANG_CXXMS) +# pragma message("GLM: C++ with VC language extensions") # endif//GLM_MODEL #endif//GLM_MESSAGE diff --git a/glm/gtc/half_float.hpp b/glm/gtc/half_float.hpp index 8c8896de..8e6a7184 100644 --- a/glm/gtc/half_float.hpp +++ b/glm/gtc/half_float.hpp @@ -47,7 +47,7 @@ namespace glm{ namespace detail { -#if 0 //ndef _MSC_EXTENSIONS +#if((GLM_LANG != GLM_LANG_CXX11) && (GLM_LANG != GLM_LANG_CXXMS)) template <> struct tvec2 { @@ -345,7 +345,7 @@ namespace detail tvec4 swizzle(comp X, comp Y, comp Z, comp W) const; tref4 swizzle(comp X, comp Y, comp Z, comp W); }; -#endif//_MSC_EXTENSIONS +#endif//((GLM_LANG != GLM_LANG_CXX11) && (GLM_LANG != GLM_LANG_CXXMS)) } //namespace detail diff --git a/test/core/core_func_swizzle.cpp b/test/core/core_func_swizzle.cpp index 5cb3a95e..4ce2192d 100644 --- a/test/core/core_func_swizzle.cpp +++ b/test/core/core_func_swizzle.cpp @@ -7,10 +7,10 @@ // File : test/core/core_func_swizzle.cpp /////////////////////////////////////////////////////////////////////////////////////////////////// -#define GLM_FORCE_ONLY_XYZW +//#define GLM_FORCE_ONLY_XYZW #define GLM_MESSAGES #define GLM_SWIZZLE_OPERATOR -//#define GLM_FORCE_CXX11 +#define GLM_FORCE_CXX98 #include int test_vec2_swizzle() diff --git a/test/core/core_type_vec1.cpp b/test/core/core_type_vec1.cpp index fddd6a47..a3687699 100644 --- a/test/core/core_type_vec1.cpp +++ b/test/core/core_type_vec1.cpp @@ -7,6 +7,7 @@ // File : test/core/type_vec1.cpp /////////////////////////////////////////////////////////////////////////////////////////////////// +#define GLM_SWIZZLE_OPERATOR #include static int test_operators() diff --git a/test/core/core_type_vec2.cpp b/test/core/core_type_vec2.cpp index f9b97577..c2bd37f6 100644 --- a/test/core/core_type_vec2.cpp +++ b/test/core/core_type_vec2.cpp @@ -7,6 +7,7 @@ // File : test/core/type_vec2.cpp /////////////////////////////////////////////////////////////////////////////////////////////////// +#define GLM_SWIZZLE_OPERATOR #include int test_vec2_operators() diff --git a/test/core/core_type_vec3.cpp b/test/core/core_type_vec3.cpp index eb1c13eb..e7af263a 100644 --- a/test/core/core_type_vec3.cpp +++ b/test/core/core_type_vec3.cpp @@ -7,6 +7,7 @@ // File : test/core/type_vec3.cpp /////////////////////////////////////////////////////////////////////////////////////////////////// +#define GLM_SWIZZLE_OPERATOR #include #include #include diff --git a/test/core/core_type_vec4.cpp b/test/core/core_type_vec4.cpp index 8078c473..3dc08180 100644 --- a/test/core/core_type_vec4.cpp +++ b/test/core/core_type_vec4.cpp @@ -7,6 +7,7 @@ // File : test/core/type_vec4.cpp /////////////////////////////////////////////////////////////////////////////////////////////////// +#define GLM_SWIZZLE_OPERATOR #include #include #include diff --git a/test/gtx/gtx_string_cast.cpp b/test/gtx/gtx_string_cast.cpp index 5ebedf69..73086157 100644 --- a/test/gtx/gtx_string_cast.cpp +++ b/test/gtx/gtx_string_cast.cpp @@ -7,6 +7,7 @@ // File : test/gtx/string_cast.cpp /////////////////////////////////////////////////////////////////////////////////////////////////// +#define GLM_MESSAGES #include #include #include