Merge branch '0.9.3' into 0.9.4

This commit is contained in:
Christophe Riccio 2012-06-30 01:11:36 +01:00
commit 35995e40f0
8 changed files with 47 additions and 34 deletions

View File

@ -14,11 +14,9 @@ endif()
option(GLM_TEST_ENABLE_CXX_11 "Enable C++ 11" OFF) option(GLM_TEST_ENABLE_CXX_11 "Enable C++ 11" OFF)
if(GLM_TEST_ENABLE_CXX_11) if(GLM_TEST_ENABLE_CXX_11)
if(CMAKE_COMPILER_IS_GNUCXX) if(CMAKE_COMPILER_IS_GNUCXX)
add_definitions(-std=c++11) add_definitions(-std=c++0x)
endif() endif()
elseif(NOT GLM_TEST_ENABLE_CXX_11) elseif(NOT GLM_TEST_ENABLE_CXX_11)
add_definitions(-DGLM_FORCE_CXX98)
if(CMAKE_COMPILER_IS_GNUCXX) if(CMAKE_COMPILER_IS_GNUCXX)
add_definitions(-std=c++98) add_definitions(-std=c++98)
endif() endif()
@ -27,8 +25,9 @@ endif()
option(GLM_TEST_ENABLE_MS_EXTENSIONS "Enable MS extensions" OFF) option(GLM_TEST_ENABLE_MS_EXTENSIONS "Enable MS extensions" OFF)
if(GLM_TEST_ENABLE_MS_EXTENSIONS) if(GLM_TEST_ENABLE_MS_EXTENSIONS)
if(CMAKE_COMPILER_IS_GNUCXX) if(CMAKE_COMPILER_IS_GNUCXX)
add_definitions(-fms-extensions) #Doesn't seem to work...
add_definitions(-D_MSC_EXTENSIONS) #add_definitions(-fms-extensions)
#add_definitions(-D_MSC_EXTENSIONS)
endif() endif()
elseif(NOT GLM_TEST_ENABLE_MS_EXTENSIONS) elseif(NOT GLM_TEST_ENABLE_MS_EXTENSIONS)
if(CMAKE_COMPILER_IS_GNUCXX) if(CMAKE_COMPILER_IS_GNUCXX)

View File

@ -191,7 +191,7 @@ namespace detail
typedef ValueType value_type; typedef ValueType value_type;
struct Stub {}; struct Stub {};
_swizzle_base2& operator= (const Stub& that) {} _swizzle_base2& operator= (Stub const &) {}
value_type operator[] (size_t i) const value_type operator[] (size_t i) const
{ {

View File

@ -301,8 +301,8 @@ namespace glm
) )
{ {
return detail::tvec2<T>( return detail::tvec2<T>(
bitfieldExtract(Value[0]), bitfieldExtract(Value[0], Offset, Bits),
bitfieldExtract(Value[1])); bitfieldExtract(Value[1], Offset, Bits));
} }
template <typename T> template <typename T>
@ -314,9 +314,9 @@ namespace glm
) )
{ {
return detail::tvec3<T>( return detail::tvec3<T>(
bitfieldExtract(Value[0]), bitfieldExtract(Value[0], Offset, Bits),
bitfieldExtract(Value[1]), bitfieldExtract(Value[1], Offset, Bits),
bitfieldExtract(Value[2])); bitfieldExtract(Value[2], Offset, Bits));
} }
template <typename T> template <typename T>
@ -328,10 +328,10 @@ namespace glm
) )
{ {
return detail::tvec4<T>( return detail::tvec4<T>(
bitfieldExtract(Value[0]), bitfieldExtract(Value[0], Offset, Bits),
bitfieldExtract(Value[1]), bitfieldExtract(Value[1], Offset, Bits),
bitfieldExtract(Value[2]), bitfieldExtract(Value[2], Offset, Bits),
bitfieldExtract(Value[3])); bitfieldExtract(Value[3], Offset, Bits));
} }
// bitfieldInsert // bitfieldInsert

View File

@ -49,9 +49,12 @@
#define GLM_PLATFORM_ANDROID 0x00100000 #define GLM_PLATFORM_ANDROID 0x00100000
#define GLM_PLATFORM_CHROME_NACL 0x00200000 #define GLM_PLATFORM_CHROME_NACL 0x00200000
#define GLM_PLATFORM_UNIX 0x00400000 #define GLM_PLATFORM_UNIX 0x00400000
#define GLM_PLATFORM_QNXNTO 0x00800000
#ifdef GLM_FORCE_PLATFORM_UNKNOWN #ifdef GLM_FORCE_PLATFORM_UNKNOWN
# define GLM_PLATFORM GLM_PLATFORM_UNKNOWN # define GLM_PLATFORM GLM_PLATFORM_UNKNOWN
#elif defined(__QNXNTO__)
# define GLM_PLATFORM GLM_PLATFORM_QNXNTO
#elif defined(__APPLE__) #elif defined(__APPLE__)
# define GLM_PLATFORM GLM_PLATFORM_APPLE # define GLM_PLATFORM GLM_PLATFORM_APPLE
#elif defined(_WIN32) #elif defined(_WIN32)
@ -471,10 +474,10 @@
#define GLM_ARCH_PURE 0x0000 #define GLM_ARCH_PURE 0x0000
#define GLM_ARCH_SSE2 0x0001 #define GLM_ARCH_SSE2 0x0001
#define GLM_ARCH_SSE3 0x0002 | GLM_ARCH_SSE2 #define GLM_ARCH_SSE3 0x0002// | GLM_ARCH_SSE2
#define GLM_ARCH_SSE4 0x0004 | GLM_ARCH_SSE3 | GLM_ARCH_SSE2 #define GLM_ARCH_SSE4 0x0004// | GLM_ARCH_SSE3 | GLM_ARCH_SSE2
#define GLM_ARCH_AVX 0x0008 | GLM_ARCH_SSE4 | GLM_ARCH_SSE3 | GLM_ARCH_SSE2 #define GLM_ARCH_AVX 0x0008// | GLM_ARCH_SSE4 | GLM_ARCH_SSE3 | GLM_ARCH_SSE2
#define GLM_ARCH_AVX2 0x0010 | GLM_ARCH_AVX | GLM_ARCH_SSE4 | GLM_ARCH_SSE3 | GLM_ARCH_SSE2 #define GLM_ARCH_AVX2 0x0010// | GLM_ARCH_AVX | GLM_ARCH_SSE4 | GLM_ARCH_SSE3 | GLM_ARCH_SSE2
#if(defined(GLM_FORCE_PURE)) #if(defined(GLM_FORCE_PURE))
# define GLM_ARCH GLM_ARCH_PURE # define GLM_ARCH GLM_ARCH_PURE
@ -504,6 +507,8 @@
# else # else
# define GLM_ARCH GLM_ARCH_PURE # define GLM_ARCH GLM_ARCH_PURE
# endif # endif
#elif((GLM_PLATFORM & GLM_PLATFORM_APPLE) && (GLM_COMPILER & GLM_COMPILER_GCC))
# define GLM_ARCH GLM_ARCH_PURE
#elif(((GLM_COMPILER & GLM_COMPILER_GCC) && (defined(__i386__) || defined(__x86_64__))) || (GLM_COMPILER & GLM_COMPILER_LLVM_GCC)) #elif(((GLM_COMPILER & GLM_COMPILER_GCC) && (defined(__i386__) || defined(__x86_64__))) || (GLM_COMPILER & GLM_COMPILER_LLVM_GCC))
# if(defined(__AVX2__)) # if(defined(__AVX2__))
# define GLM_ARCH GLM_ARCH_AVX2 # define GLM_ARCH GLM_ARCH_AVX2
@ -522,23 +527,23 @@
# define GLM_ARCH GLM_ARCH_PURE # define GLM_ARCH GLM_ARCH_PURE
#endif #endif
#if(GLM_ARCH != GLM_ARCH_PURE) //#if(GLM_ARCH != GLM_ARCH_PURE)
#if((GLM_ARCH & GLM_ARCH_AVX2) == GLM_ARCH_AVX2) #if(GLM_ARCH & GLM_ARCH_AVX2)
# include <immintrin.h> # include <immintrin.h>
#endif//GLM_ARCH #endif//GLM_ARCH
#if((GLM_ARCH & GLM_ARCH_AVX) == GLM_ARCH_AVX) #if(GLM_ARCH & GLM_ARCH_AVX)
# include <immintrin.h> # include <immintrin.h>
#endif//GLM_ARCH #endif//GLM_ARCH
#if((GLM_ARCH & GLM_ARCH_SSE4) == GLM_ARCH_SSE4) #if(GLM_ARCH & GLM_ARCH_SSE4)
# include <smmintrin.h> # include <smmintrin.h>
#endif//GLM_ARCH #endif//GLM_ARCH
#if((GLM_ARCH & GLM_ARCH_SSE3) == GLM_ARCH_SSE3) #if(GLM_ARCH & GLM_ARCH_SSE3)
# include <pmmintrin.h> # include <pmmintrin.h>
#endif//GLM_ARCH #endif//GLM_ARCH
#if((GLM_ARCH & GLM_ARCH_SSE2) == GLM_ARCH_SSE2) #if(GLM_ARCH & GLM_ARCH_SSE2)
# include <emmintrin.h> # include <emmintrin.h>
#endif//GLM_ARCH #endif//GLM_ARCH
#endif//(GLM_ARCH != GLM_ARCH_PURE) //#endif//(GLM_ARCH != GLM_ARCH_PURE)
#if(defined(GLM_MESSAGES) && !defined(GLM_MESSAGE_ARCH_DISPLAYED)) #if(defined(GLM_MESSAGES) && !defined(GLM_MESSAGE_ARCH_DISPLAYED))
# define GLM_MESSAGE_ARCH_DISPLAYED # define GLM_MESSAGE_ARCH_DISPLAYED
@ -563,8 +568,11 @@
#define GLM_SUPPORT_ANONYMOUS_UNION() \ #define GLM_SUPPORT_ANONYMOUS_UNION() \
((GLM_LANG & GLM_LANG_CXX98) == GLM_LANG_CXX98) ((GLM_LANG & GLM_LANG_CXX98) == GLM_LANG_CXX98)
//#define GLM_SUPPORT_ANONYMOUS_UNION_OF_STRUCTURE() \
// (((GLM_LANG & GLM_LANG_CXX11) == GLM_LANG_CXX11) || ((GLM_COMPILER & GLM_COMPILER_VC) && (GLM_LANG & GLM_LANG_CXXMS) == GLM_LANG_CXXMS) || ((GLM_COMPILER & GLM_COMPILER_GCC) && (GLM_LANG == GLM_LANG_CXX0X)))
#define GLM_SUPPORT_ANONYMOUS_UNION_OF_STRUCTURE() \ #define GLM_SUPPORT_ANONYMOUS_UNION_OF_STRUCTURE() \
(((GLM_LANG & GLM_LANG_CXX11) == GLM_LANG_CXX11) || ((GLM_LANG & GLM_LANG_CXXMS) == GLM_LANG_CXXMS) || ((GLM_COMPILER & GLM_COMPILER_GCC) && (GLM_LANG == GLM_LANG_CXX0X))) (((GLM_LANG & GLM_LANG_CXX11) == GLM_LANG_CXX11) || ((GLM_COMPILER & GLM_COMPILER_VC) && ((GLM_LANG & GLM_LANG_CXXMS) == GLM_LANG_CXXMS)) || ((GLM_LANG == GLM_LANG_CXX0X) == GLM_LANG_CXX0X))
#define GLM_SUPPORT_SWIZZLE_OPERATOR() \ #define GLM_SUPPORT_SWIZZLE_OPERATOR() \
(/*defined(GLM_SWIZZLE) && */GLM_SUPPORT_ANONYMOUS_UNION_OF_STRUCTURE()) (/*defined(GLM_SWIZZLE) && */GLM_SUPPORT_ANONYMOUS_UNION_OF_STRUCTURE())

View File

@ -47,7 +47,7 @@
namespace glm{ namespace glm{
namespace detail namespace detail
{ {
#if(!GLM_SUPPORT_ANONYMOUS_UNION_OF_STRUCTURE()) #if(GLM_COMPONENT == GLM_COMPONENT_CXX98)
template <> template <>
struct tvec2<half> struct tvec2<half>
{ {
@ -345,7 +345,7 @@ namespace detail
tvec4<half> swizzle(comp X, comp Y, comp Z, comp W) const; tvec4<half> swizzle(comp X, comp Y, comp Z, comp W) const;
tref4<half> swizzle(comp X, comp Y, comp Z, comp W); tref4<half> swizzle(comp X, comp Y, comp Z, comp W);
}; };
#endif//(!GLM_SUPPORT_ANONYMOUS_UNION_OF_STRUCTURE()) #endif//(GLM_COMPONENT == GLM_COMPONENT_CXX98)
} }
//namespace detail //namespace detail

View File

@ -29,7 +29,7 @@
namespace glm{ namespace glm{
namespace detail namespace detail
{ {
#if(!GLM_SUPPORT_ANONYMOUS_UNION_OF_STRUCTURE()) #if(GLM_COMPONENT == GLM_COMPONENT_CXX98)
////////////////////////////////////// //////////////////////////////////////
// hvec2 // hvec2
@ -1003,7 +1003,7 @@ namespace detail
(*this)[w]); (*this)[w]);
} }
#endif//(!GLM_SUPPORT_ANONYMOUS_UNION_OF_STRUCTURE()) #endif//(GLM_COMPONENT == GLM_COMPONENT_CXX98)
}//namespace detail }//namespace detail
}//namespace glm }//namespace glm

View File

@ -46,7 +46,7 @@
#if(defined(GLM_MESSAGES) && !defined(glm_ext)) #if(defined(GLM_MESSAGES) && !defined(glm_ext))
# pragma message("GLM: GLM_VIRTREV_xstream extension included") # pragma message("GLM: GLM_VIRTREV_xstream extension included")
#endif #endif
/*
namespace glm{ namespace glm{
namespace detail namespace detail
{ {
@ -162,5 +162,5 @@ namespace detail
}//namespace detail }//namespace detail
}//namespace glm }//namespace glm
*/
#endif//GLM_VIRTREV_xstream #endif//GLM_VIRTREV_xstream

View File

@ -37,9 +37,15 @@ More informations in GLM manual:
http://glm.g-truc.net/glm-0.9.3.pdf http://glm.g-truc.net/glm-0.9.3.pdf
================================================================================ ================================================================================
GLM 0.9.3.4: 2012-XX-XX GLM 0.9.3.4: 2012-06-28
-------------------------------------------------------------------------------- --------------------------------------------------------------------------------
- Added SSE4 and AVX2 detection. - Added SSE4 and AVX2 detection.
- Removed VIRTREV_xstream and the incompatibility generated with GCC
- Fixed C++11 compiler option for GCC
- Removed MS language extension option for GCC (not fonctionnal)
- Fixed bitfieldExtract for vector types
- Fixed warnings
- Fixed SSE includes
================================================================================ ================================================================================
GLM 0.9.3.3: 2012-05-10 GLM 0.9.3.3: 2012-05-10