mirror of
https://github.com/g-truc/glm.git
synced 2024-11-10 04:31:47 +00:00
Fixed merge
This commit is contained in:
commit
db150c6bda
@ -44,35 +44,26 @@
|
||||
#define GLM_PLATFORM_UNKNOWN 0x00000000
|
||||
#define GLM_PLATFORM_WINDOWS 0x00010000
|
||||
#define GLM_PLATFORM_LINUX 0x00020000
|
||||
#define GLM_PLATFORM_MACOSX 0x00040000
|
||||
#define GLM_PLATFORM_IOS 0x00080000
|
||||
#define GLM_PLATFORM_APPLE 0x00040000
|
||||
//#define GLM_PLATFORM_IOS 0x00080000
|
||||
#define GLM_PLATFORM_ANDROID 0x00100000
|
||||
#define GLM_PLATFORM_CHROME_NACL 0x00200000
|
||||
#define GLM_PLATFORM_UNIX 0x00040000
|
||||
#define GLM_PLATFORM_UNIX 0x00400000
|
||||
|
||||
#ifdef GLM_FORCE_PLATFORM_UNKNOWN
|
||||
# define GLM_PLATFORM GLM_PLATFORM_UNKNOWN
|
||||
#elif defined(__APPLE__)
|
||||
# define GLM_PLATFORM GLM_PLATFORM_APPLE
|
||||
#elif defined(_WIN32)
|
||||
# define GLM_PLATFORM GLM_PLATFORM_WINDOWS
|
||||
#elif defined(__unix)
|
||||
# if defined(__APPLE__)
|
||||
# include "TargetConditionals.h"
|
||||
# if defined(TARGET_OS_IPHONE) || defined(TARGET_IPHONE_SIMULATOR)
|
||||
# define GLM_PLATFORM GLM_PLATFORM_IOS
|
||||
# elif defined(TARGET_OS_MAC)
|
||||
# define GLM_PLATFORM GLM_PLATFORM_MACOSX
|
||||
# else
|
||||
# define GLM_PLATFORM GLM_PLATFORM_UNKNOWN
|
||||
# endif
|
||||
# elif defined(ANDROID)
|
||||
# define GLM_PLATFORM GLM_PLATFORM_ANDROID
|
||||
# elif defined(__linux)
|
||||
# define GLM_PLATFORM GLM_PLATFORM_LINUX
|
||||
# else
|
||||
# define GLM_PLATFORM GLM_PLATFORM_UNIX
|
||||
# endif
|
||||
#elif defined(__native_client__)
|
||||
# define GLM_PLATFORM GLM_PLATFORM_CHROME_NACL
|
||||
#elif defined(ANDROID)
|
||||
# define GLM_PLATFORM GLM_PLATFORM_ANDROID
|
||||
#elif defined(__linux)
|
||||
# define GLM_PLATFORM GLM_PLATFORM_LINUX
|
||||
#elif defined(__unix)
|
||||
# define GLM_PLATFORM GLM_PLATFORM_UNIX
|
||||
#else
|
||||
# define GLM_PLATFORM GLM_PLATFORM_UNKNOWN
|
||||
#endif//
|
||||
@ -82,10 +73,10 @@
|
||||
# define GLM_MESSAGE_PLATFORM_DISPLAYED
|
||||
# if(GLM_PLATFORM & GLM_PLATFORM_WINDOWS)
|
||||
# pragma message("GLM: Windows platform detected")
|
||||
# elif(GLM_PLATFORM & GLM_PLATFORM_IOS)
|
||||
# pragma message("GLM: iOS platform detected")
|
||||
# elif(GLM_PLATFORM & GLM_PLATFORM_MACOSX)
|
||||
# pragma message("GLM: MacOSX platform detected")
|
||||
//# elif(GLM_PLATFORM & GLM_PLATFORM_IOS)
|
||||
//# pragma message("GLM: iOS platform detected")
|
||||
# elif(GLM_PLATFORM & GLM_PLATFORM_APPLE)
|
||||
# pragma message("GLM: Apple platform detected")
|
||||
# elif(GLM_PLATFORM & GLM_PLATFORM_LINUX)
|
||||
# pragma message("GLM: Linux platform detected")
|
||||
# elif(GLM_PLATFORM & GLM_PLATFORM_UNIX)
|
||||
@ -293,7 +284,7 @@
|
||||
# endif
|
||||
|
||||
// G++
|
||||
#elif defined(__GNUC__)// || defined(__llvm__) || defined(__clang__)
|
||||
#elif(defined(__GNUC__) || defined(__MINGW32__))// || defined(__llvm__) || defined(__clang__)
|
||||
# if defined (__llvm__)
|
||||
# define GLM_COMPILER_GCC_EXTRA GLM_COMPILER_GCC_LLVM
|
||||
# elif defined (__clang__)
|
||||
@ -434,9 +425,8 @@
|
||||
#elif(defined(GLM_FORCE_CXX98))
|
||||
# define GLM_LANG GLM_LANG_CXX98
|
||||
#else
|
||||
# if(((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
|
||||
// -std=c++0x or -std=gnu++0x
|
||||
# if(((GLM_COMPILER & GLM_COMPILER_GCC) == GLM_COMPILER_GCC) && defined(__GXX_EXPERIMENTAL_CXX0X__))
|
||||
# define GLM_LANG GLM_LANG_CXX0X
|
||||
# elif(((GLM_COMPILER & GLM_COMPILER_VC) == GLM_COMPILER_VC) && defined(_MSC_EXTENSIONS))
|
||||
# define GLM_LANG GLM_LANG_CXXMS
|
||||
@ -446,6 +436,10 @@
|
||||
# else
|
||||
# define GLM_LANG GLM_LANG_CXX98
|
||||
# endif//(GLM_COMPILER == GLM_COMPILER_VC2010)
|
||||
# elif((GLM_COMPILER & GLM_COMPILER_GCC) == GLM_COMPILER_GCC) //&& defined(__STRICT_ANSI__))
|
||||
# define GLM_LANG GLM_LANG_CXX98
|
||||
# elif((GLM_COMPILER & GLM_COMPILER_CLANG) == GLM_COMPILER_CLANG)
|
||||
# define GLM_LANG GLM_LANG_CXX98
|
||||
# else
|
||||
# define GLM_LANG GLM_LANG_CXX
|
||||
# endif
|
||||
@ -545,11 +539,11 @@
|
||||
# if(GLM_ARCH == GLM_ARCH_PURE)
|
||||
# pragma message("GLM: Platform independent")
|
||||
# elif(GLM_ARCH == GLM_ARCH_SSE2)
|
||||
# pragma message("GLM: SSE2 build platform")
|
||||
# pragma message("GLM: SSE2 instruction set")
|
||||
# elif(GLM_ARCH == GLM_ARCH_SSE3)
|
||||
# pragma message("GLM: SSE3 build platform")
|
||||
# pragma message("GLM: SSE3 instruction set")
|
||||
# elif(GLM_ARCH == GLM_ARCH_AVX)
|
||||
# pragma message("GLM: AVX build platform")
|
||||
# pragma message("GLM: AVX instruction set")
|
||||
# endif//GLM_ARCH
|
||||
#endif//GLM_MESSAGE
|
||||
|
||||
|
@ -61,7 +61,7 @@ namespace detail
|
||||
//////////////////////////////////////
|
||||
// Data
|
||||
|
||||
# if(GLM_SUPPORT_ANONYMOUS_UNION_OF_STRUCTURE() && !defined(GLM_FORCE_ONLY_XYZW))
|
||||
# if(GLM_COMPONENT == GLM_COMPONENT_CXX11)
|
||||
union
|
||||
{
|
||||
# if(defined(GLM_SWIZZLE))
|
||||
@ -80,7 +80,7 @@ namespace detail
|
||||
struct{value_type s, t;};
|
||||
struct{value_type x, y;};
|
||||
};
|
||||
# elif(GLM_SUPPORT_ANONYMOUS_UNION() && !defined(GLM_FORCE_ONLY_XYZW))
|
||||
# elif(GLM_COMPONENT == GLM_COMPONENT_CXX98)
|
||||
union {value_type x, r, s;};
|
||||
union {value_type y, g, t;};
|
||||
|
||||
@ -89,7 +89,7 @@ namespace detail
|
||||
GLM_SWIZZLE_GEN_REF_FROM_VEC2(value_type, detail::tvec2, detail::tref2)
|
||||
GLM_SWIZZLE_GEN_VEC_FROM_VEC2(value_type, detail::tvec2, detail::tvec2, detail::tvec3, detail::tvec4)
|
||||
# endif//(defined(GLM_SWIZZLE))
|
||||
# else
|
||||
# else //(GLM_COMPONENT == GLM_COMPONENT_ONLY_XYZW)
|
||||
value_type x, y;
|
||||
|
||||
# if(defined(GLM_SWIZZLE))
|
||||
|
@ -61,7 +61,7 @@ namespace detail
|
||||
//////////////////////////////////////
|
||||
// Data
|
||||
|
||||
# if(GLM_SUPPORT_ANONYMOUS_UNION_OF_STRUCTURE() && !defined(GLM_FORCE_ONLY_XYZW))
|
||||
# if(GLM_COMPONENT == GLM_COMPONENT_CXX11)
|
||||
union
|
||||
{
|
||||
# if(defined(GLM_SWIZZLE))
|
||||
@ -80,7 +80,7 @@ namespace detail
|
||||
struct{value_type s, t, p;};
|
||||
struct{value_type x, y, z;};
|
||||
};
|
||||
# elif(GLM_SUPPORT_ANONYMOUS_UNION() && !defined(GLM_FORCE_ONLY_XYZW))
|
||||
# elif(GLM_COMPONENT == GLM_COMPONENT_CXX98)
|
||||
union {value_type x, r, s;};
|
||||
union {value_type y, g, t;};
|
||||
union {value_type z, b, p;};
|
||||
@ -90,7 +90,7 @@ namespace detail
|
||||
GLM_SWIZZLE_GEN_REF_FROM_VEC3(T, detail::tvec3, detail::tref2, detail::tref3)
|
||||
GLM_SWIZZLE_GEN_VEC_FROM_VEC3(T, detail::tvec3, detail::tvec2, detail::tvec3, detail::tvec4)
|
||||
# endif//(defined(GLM_SWIZZLE))
|
||||
# else
|
||||
# else //(GLM_COMPONENT == GLM_COMPONENT_ONLY_XYZW)
|
||||
value_type x, y, z;
|
||||
|
||||
# if(defined(GLM_SWIZZLE))
|
||||
|
@ -61,7 +61,7 @@ namespace detail
|
||||
//////////////////////////////////////
|
||||
// Data
|
||||
|
||||
# if(GLM_SUPPORT_ANONYMOUS_UNION_OF_STRUCTURE() && !defined(GLM_FORCE_ONLY_XYZW))
|
||||
# if(GLM_COMPONENT == GLM_COMPONENT_CXX11)
|
||||
union
|
||||
{
|
||||
# if(defined(GLM_SWIZZLE))
|
||||
@ -80,7 +80,7 @@ namespace detail
|
||||
struct{value_type s, t, p, q;};
|
||||
struct{value_type x, y, z, w;};
|
||||
};
|
||||
# elif(GLM_SUPPORT_ANONYMOUS_UNION() && !defined(GLM_FORCE_ONLY_XYZW))
|
||||
# elif(GLM_COMPONENT == GLM_COMPONENT_CXX98)
|
||||
union {value_type x, r, s;};
|
||||
union {value_type y, g, t;};
|
||||
union {value_type z, b, p;};
|
||||
@ -91,7 +91,7 @@ namespace detail
|
||||
GLM_SWIZZLE_GEN_REF_FROM_VEC4(T, detail::tvec4, detail::tref2, detail::tref3, detail::tref4)
|
||||
GLM_SWIZZLE_GEN_VEC_FROM_VEC4(T, detail::tvec4, detail::tvec2, detail::tvec3, detail::tvec4)
|
||||
# endif//(defined(GLM_SWIZZLE))
|
||||
# else
|
||||
# else //(GLM_COMPONENT == GLM_COMPONENT_ONLY_XYZW)
|
||||
value_type x, y, z, w;
|
||||
|
||||
# if(defined(GLM_SWIZZLE))
|
||||
|
@ -133,6 +133,12 @@ int test_compiler()
|
||||
case GLM_COMPILER_CLANG29:
|
||||
std::cout << "GLM_COMPILER_CLANG29" << std::endl;
|
||||
break;
|
||||
case GLM_COMPILER_CLANG30:
|
||||
std::cout << "GLM_COMPILER_CLANG30" << std::endl;
|
||||
break;
|
||||
case GLM_COMPILER_CLANG31:
|
||||
std::cout << "GLM_COMPILER_CLANG31" << std::endl;
|
||||
break;
|
||||
case GLM_COMPILER_LLVM_GCC:
|
||||
std::cout << "GLM_COMPILER_LLVM_GCC" << std::endl;
|
||||
break;
|
||||
|
Loading…
Reference in New Issue
Block a user