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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -46,7 +46,7 @@
#if(defined(GLM_MESSAGES) && !defined(glm_ext))
# pragma message("GLM: GLM_VIRTREV_xstream extension included")
#endif
/*
namespace glm{
namespace detail
{
@ -162,5 +162,5 @@ namespace detail
}//namespace detail
}//namespace glm
*/
#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
================================================================================
GLM 0.9.3.4: 2012-XX-XX
GLM 0.9.3.4: 2012-06-28
--------------------------------------------------------------------------------
- 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