diff --git a/CMakeLists.txt b/CMakeLists.txt index f481ce80..a502bd38 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -5,9 +5,10 @@ project(glm) enable_testing() add_definitions(-D_CRT_SECURE_NO_WARNINGS) +add_definitions(-pedantic) #add_definitions(-S) #add_definitions(-s) -#add_definitions(-msse2) +add_definitions(-msse2) #add_definitions(-m32) #add_definitions(-mfpmath=387) #add_definitions(-ffast-math) diff --git a/glm/core/_detail.hpp b/glm/core/_detail.hpp index 16124b41..9b36a921 100644 --- a/glm/core/_detail.hpp +++ b/glm/core/_detail.hpp @@ -10,7 +10,7 @@ #ifndef glm_core_detail #define glm_core_detail -#include "../setup.hpp" +#include "setup.hpp" #include namespace glm{ @@ -24,6 +24,16 @@ namespace detail #elif(GLM_COMPILER & GLM_COMPILER_GCC) __extension__ typedef signed long long sint64; __extension__ typedef unsigned long long uint64; +//# if GLM_MODEL == GLM_MODEL_64 +// typedef signed long highp_int_t; +// typedef unsigned long highp_uint_t; +//# elif GLM_MODEL == GLM_MODEL_32 +// __extension__ typedef signed long long highp_int_t; +// __extension__ typedef unsigned long long highp_uint_t; +//# endif//GLM_MODEL +#elif(GLM_COMPILER & GLM_COMPILER_BC) + typedef Int64 sint64; + typedef Uint64 uint64; #else//unknown compiler typedef signed long sint64; typedef unsigned long uint64; @@ -259,7 +269,7 @@ namespace detail _YES = 1, \ _NO = 0 \ }; \ - }; + } ////////////////// // matrix @@ -323,11 +333,13 @@ namespace detail #if((GLM_COMPILER & GLM_COMPILER_VC) && (GLM_COMPILER >= GLM_COMPILER_VC2005)) # define GLM_DEPRECATED __declspec(deprecated) # define GLM_ALIGN(x) __declspec(align(x)) +# define GLM_ALIGNED_STRUCT(x) __declspec(align(x)) struct # define GLM_RESTRICT __declspec(restrict) # define GLM_RESTRICT_VAR __restrict #elif((GLM_COMPILER & GLM_COMPILER_GCC) && (GLM_COMPILER >= GLM_COMPILER_GCC31)) # define GLM_DEPRECATED __attribute__((__deprecated__)) # define GLM_ALIGN(x) __attribute__((aligned(x))) +# define GLM_ALIGNED_STRUCT(x) struct __attribute__((aligned(x))) # if(GLM_COMPILER >= GLM_COMPILER_GCC33) # define GLM_RESTRICT __restrict__ # define GLM_RESTRICT_VAR __restrict__ @@ -339,7 +351,8 @@ namespace detail # define GLM_RESTRICT_VAR __restrict__ #else # define GLM_DEPRECATED -# define GLM_ALIGN(x) +# define GLM_ALIGN +# define GLM_ALIGNED_STRUCT(x) # define GLM_RESTRICT # define GLM_RESTRICT_VAR #endif//GLM_COMPILER diff --git a/glm/core/_fixes.hpp b/glm/core/_fixes.hpp new file mode 100644 index 00000000..ba708003 --- /dev/null +++ b/glm/core/_fixes.hpp @@ -0,0 +1,18 @@ +/////////////////////////////////////////////////////////////////////////////////////////////////// +// OpenGL Mathematics Copyright (c) 2005 - 2011 G-Truc Creation (www.g-truc.net) +/////////////////////////////////////////////////////////////////////////////////////////////////// +// Created : 2011-02-21 +// Updated : 2011-02-21 +// Licence : This source is under MIT License +// File : glm/core/_fixes.hpp +/////////////////////////////////////////////////////////////////////////////////////////////////// + +//! Workaround for compatibility with other libraries +#ifdef max +#undef max +#endif + +//! Workaround for compatibility with other libraries +#ifdef min +#undef min +#endif diff --git a/glm/core/func_common.hpp b/glm/core/func_common.hpp index df3ac062..c9cdc8ba 100644 --- a/glm/core/func_common.hpp +++ b/glm/core/func_common.hpp @@ -10,6 +10,8 @@ #ifndef glm_core_func_common #define glm_core_func_common +#include "_fixes.hpp" + namespace glm { namespace test{ diff --git a/glm/core/intrinsic_common.hpp b/glm/core/intrinsic_common.hpp index 9028b4e7..ec2516e5 100644 --- a/glm/core/intrinsic_common.hpp +++ b/glm/core/intrinsic_common.hpp @@ -10,7 +10,7 @@ #ifndef glm_detail_intrinsic_common #define glm_detail_intrinsic_common -#include "../setup.hpp" +#include "setup.hpp" #if((GLM_ARCH & GLM_ARCH_SSE2) != GLM_ARCH_SSE2) # error "SSE2 instructions not supported or enabled" diff --git a/glm/core/intrinsic_exponential.hpp b/glm/core/intrinsic_exponential.hpp index 385e1fe0..317395c5 100644 --- a/glm/core/intrinsic_exponential.hpp +++ b/glm/core/intrinsic_exponential.hpp @@ -10,7 +10,7 @@ #ifndef glm_detail_intrinsic_exponential #define glm_detail_intrinsic_exponential -#include "../setup.hpp" +#include "setup.hpp" #if((GLM_ARCH & GLM_ARCH_SSE2) != GLM_ARCH_SSE2) # error "SSE2 instructions not supported or enabled" diff --git a/glm/core/intrinsic_geometric.hpp b/glm/core/intrinsic_geometric.hpp index 3791e6df..d640774b 100644 --- a/glm/core/intrinsic_geometric.hpp +++ b/glm/core/intrinsic_geometric.hpp @@ -10,7 +10,7 @@ #ifndef glm_core_intrinsic_geometric #define glm_core_intrinsic_geometric -#include "../setup.hpp" +#include "setup.hpp" #if((GLM_ARCH & GLM_ARCH_SSE2) != GLM_ARCH_SSE2) # error "SSE2 instructions not supported or enabled" diff --git a/glm/core/intrinsic_matrix.hpp b/glm/core/intrinsic_matrix.hpp index 36414e29..7bb4bd17 100644 --- a/glm/core/intrinsic_matrix.hpp +++ b/glm/core/intrinsic_matrix.hpp @@ -10,7 +10,7 @@ #ifndef glm_detail_intrinsic_matrix #define glm_detail_intrinsic_matrix -#include "../setup.hpp" +#include "setup.hpp" #if((GLM_ARCH & GLM_ARCH_SSE2) != GLM_ARCH_SSE2) # error "SSE2 instructions not supported or enabled" diff --git a/glm/core/intrinsic_trigonometric.hpp b/glm/core/intrinsic_trigonometric.hpp index 6e4d532c..cdd82c46 100644 --- a/glm/core/intrinsic_trigonometric.hpp +++ b/glm/core/intrinsic_trigonometric.hpp @@ -10,7 +10,7 @@ #ifndef glm_detail_intrinsic_trigonometric #define glm_detail_intrinsic_trigonometric -#include "../setup.hpp" +#include "setup.hpp" #if((GLM_ARCH & GLM_ARCH_SSE2) != GLM_ARCH_SSE2) # error "SSE2 instructions not supported or enabled" diff --git a/glm/core/intrinsic_vector_relational.hpp b/glm/core/intrinsic_vector_relational.hpp index 5d6c1a7a..e53817a4 100644 --- a/glm/core/intrinsic_vector_relational.hpp +++ b/glm/core/intrinsic_vector_relational.hpp @@ -10,7 +10,7 @@ #ifndef glm_detail_intrinsic_vector_relational #define glm_detail_intrinsic_vector_relational -#include "../setup.hpp" +#include "setup.hpp" #if((GLM_ARCH & GLM_ARCH_SSE2) != GLM_ARCH_SSE2) # error "SSE2 instructions not supported or enabled" diff --git a/glm/setup.hpp b/glm/core/setup.hpp similarity index 99% rename from glm/setup.hpp rename to glm/core/setup.hpp index 65c4c071..29c9a2f8 100644 --- a/glm/setup.hpp +++ b/glm/core/setup.hpp @@ -365,6 +365,7 @@ # define GLM_STATIC_ASSERT(x, message) typedef char __CASSERT__##__LINE__[(x) ? 1 : -1] #else # define GLM_STATIC_ASSERT(x, message) +# define GLM_STATIC_ASSERT_NULL #endif//GLM_LANG /////////////////////////////////////////////////////////////////////////////////////////////////// diff --git a/glm/core/type_float.hpp b/glm/core/type_float.hpp index 43aabb41..b62c7755 100644 --- a/glm/core/type_float.hpp +++ b/glm/core/type_float.hpp @@ -11,7 +11,7 @@ #define glm_core_type_float #include "type_half.hpp" -#include "../setup.hpp" +#include "setup.hpp" namespace glm { diff --git a/glm/core/type_int.hpp b/glm/core/type_int.hpp index e788d333..6903c2b0 100644 --- a/glm/core/type_int.hpp +++ b/glm/core/type_int.hpp @@ -10,33 +10,20 @@ #ifndef glm_core_type_int #define glm_core_type_int -#include "../setup.hpp" +#include "setup.hpp" #include "_detail.hpp" namespace glm { namespace detail { -#if defined(GLM_COMPILER) && (GLM_COMPILER & GLM_COMPILER_VC) - typedef signed __int64 highp_int_t; - typedef unsigned __int64 highp_uint_t; -#elif(defined(GLM_COMPILER) && (GLM_COMPILER & GLM_COMPILER_GCC)) - __extension__ typedef signed long long highp_int_t; - __extension__ typedef unsigned long long highp_uint_t; -//# if GLM_MODEL == GLM_MODEL_64 -// typedef signed long highp_int_t; -// typedef unsigned long highp_uint_t; -//# elif GLM_MODEL == GLM_MODEL_32 -// __extension__ typedef signed long long highp_int_t; -// __extension__ typedef unsigned long long highp_uint_t; -//# endif//GLM_MODEL -#elif(defined(GLM_COMPILER_BC)) - typedef Int64 highp_int_t; - typedef Uint64 highp_uint_t; -#else - typedef signed long long highp_int_t; - typedef unsigned long long highp_uint_t; -#endif//GLM_COMPILER + typedef signed short lowp_int_t; + typedef signed int mediump_int_t; + typedef sint64 highp_int_t; + + typedef unsigned short lowp_uint_t; + typedef unsigned int mediump_uint_t; + typedef uint64 highp_uint_t; GLM_DETAIL_IS_INT(signed char); GLM_DETAIL_IS_INT(signed short); @@ -49,14 +36,6 @@ namespace glm GLM_DETAIL_IS_UINT(unsigned int); GLM_DETAIL_IS_UINT(unsigned long); GLM_DETAIL_IS_UINT(highp_uint_t); - - typedef signed short lowp_int_t; - typedef signed int mediump_int_t; - typedef detail::highp_int_t highp_int_t; - - typedef unsigned short lowp_uint_t; - typedef unsigned int mediump_uint_t; - typedef detail::highp_uint_t highp_uint_t; } //namespace detail diff --git a/glm/glm.hpp b/glm/glm.hpp index a587e78c..ac418334 100644 --- a/glm/glm.hpp +++ b/glm/glm.hpp @@ -7,19 +7,11 @@ // File : glm/glm.hpp /////////////////////////////////////////////////////////////////////////////////////////////////// +#include "core/_fixes.hpp" + #ifndef glm_glm #define glm_glm -//! Workaround for compatibility with other libraries -#ifdef max -#undef max -#endif - -//! Workaround for compatibility with other libraries -#ifdef min -#undef min -#endif - //! TODO: to delete #define GLMvalType typename genType::value_type //#define GLMcolType typename genType::col_type @@ -29,7 +21,7 @@ #include #include #include -#include "./setup.hpp" +#include "core/setup.hpp" #if(defined(GLM_MESSAGES) && !defined(GLM_MESSAGE_CORE_INCLUDED_DISPLAYED)) # define GLM_MESSAGE_CORE_INCLUDED_DISPLAYED @@ -95,18 +87,20 @@ namespace glm //////////////////// // check type sizes -GLM_STATIC_ASSERT(sizeof(glm::detail::int8) == 1, "int8 size isn't 1 byte on this platform"); -GLM_STATIC_ASSERT(sizeof(glm::detail::int16) == 2, "int16 size isn't 2 bytes on this platform"); -GLM_STATIC_ASSERT(sizeof(glm::detail::int32) == 4, "int32 size isn't 4 bytes on this platform"); -GLM_STATIC_ASSERT(sizeof(glm::detail::int64) == 8, "int64 size isn't 8 bytes on this platform"); - -GLM_STATIC_ASSERT(sizeof(glm::detail::uint8) == 1, "uint8 size isn't 1 byte on this platform"); -GLM_STATIC_ASSERT(sizeof(glm::detail::uint16) == 2, "uint16 size isn't 2 bytes on this platform"); -GLM_STATIC_ASSERT(sizeof(glm::detail::uint32) == 4, "uint32 size isn't 4 bytes on this platform"); -GLM_STATIC_ASSERT(sizeof(glm::detail::uint64) == 8, "uint64 size isn't 8 bytes on this platform"); - -GLM_STATIC_ASSERT(sizeof(glm::detail::float16) == 2, "float16 size isn't 2 bytes on this platform"); -GLM_STATIC_ASSERT(sizeof(glm::detail::float32) == 4, "float32 size isn't 4 bytes on this platform"); -GLM_STATIC_ASSERT(sizeof(glm::detail::float64) == 8, "float64 size isn't 8 bytes on this platform"); +#ifndef GLM_STATIC_ASSERT_NULL + GLM_STATIC_ASSERT(sizeof(glm::detail::int8) == 1, "int8 size isn't 1 byte on this platform"); + GLM_STATIC_ASSERT(sizeof(glm::detail::int16) == 2, "int16 size isn't 2 bytes on this platform"); + GLM_STATIC_ASSERT(sizeof(glm::detail::int32) == 4, "int32 size isn't 4 bytes on this platform"); + GLM_STATIC_ASSERT(sizeof(glm::detail::int64) == 8, "int64 size isn't 8 bytes on this platform"); + + GLM_STATIC_ASSERT(sizeof(glm::detail::uint8) == 1, "uint8 size isn't 1 byte on this platform"); + GLM_STATIC_ASSERT(sizeof(glm::detail::uint16) == 2, "uint16 size isn't 2 bytes on this platform"); + GLM_STATIC_ASSERT(sizeof(glm::detail::uint32) == 4, "uint32 size isn't 4 bytes on this platform"); + GLM_STATIC_ASSERT(sizeof(glm::detail::uint64) == 8, "uint64 size isn't 8 bytes on this platform"); + + GLM_STATIC_ASSERT(sizeof(glm::detail::float16) == 2, "float16 size isn't 2 bytes on this platform"); + GLM_STATIC_ASSERT(sizeof(glm::detail::float32) == 4, "float32 size isn't 4 bytes on this platform"); + GLM_STATIC_ASSERT(sizeof(glm::detail::float64) == 8, "float64 size isn't 8 bytes on this platform"); +#endif//GLM_STATIC_ASSERT_NULL #endif //glm_glm diff --git a/glm/gtc/matrix_inverse.inl b/glm/gtc/matrix_inverse.inl index e27eb301..9cd81fa1 100644 --- a/glm/gtc/matrix_inverse.inl +++ b/glm/gtc/matrix_inverse.inl @@ -8,7 +8,7 @@ /////////////////////////////////////////////////////////////////////////////////////////////////// namespace glm{ -namespace gtx{ +namespace gtc{ namespace matrix_inverse { template @@ -135,5 +135,5 @@ namespace matrix_inverse } }//namespace matrix_inverse -}//namespace gtx +}//namespace gtc }//namespace glm diff --git a/glm/gtc/swizzle.hpp b/glm/gtc/swizzle.hpp index 5134a460..7ebd630c 100644 --- a/glm/gtc/swizzle.hpp +++ b/glm/gtc/swizzle.hpp @@ -148,113 +148,113 @@ namespace glm inline detail::tvec4 swizzle(detail::tvec##SIZE const & v) \ {return detail::tvec4(v[x], v[y], v[z], v[w]);} */ - static_swizzle2_const(glm::f16vec2); - static_swizzle2_const(glm::f16vec3); - static_swizzle2_const(glm::f16vec4); - static_swizzle2_const(glm::f32vec2); - static_swizzle2_const(glm::f32vec3); - static_swizzle2_const(glm::f32vec4); - static_swizzle2_const(glm::f64vec2); - static_swizzle2_const(glm::f64vec3); - static_swizzle2_const(glm::f64vec4); - - static_swizzle2_const(glm::i8vec2); - static_swizzle2_const(glm::i8vec3); - static_swizzle2_const(glm::i8vec4); - static_swizzle2_const(glm::i16vec2); - static_swizzle2_const(glm::i16vec3); - static_swizzle2_const(glm::i16vec4); - static_swizzle2_const(glm::i32vec2); - static_swizzle2_const(glm::i32vec3); - static_swizzle2_const(glm::i32vec4); - static_swizzle2_const(glm::i64vec2); - static_swizzle2_const(glm::i64vec3); - static_swizzle2_const(glm::i64vec4); - - static_swizzle2_const(glm::u8vec2); - static_swizzle2_const(glm::u8vec3); - static_swizzle2_const(glm::u8vec4); - static_swizzle2_const(glm::u16vec2); - static_swizzle2_const(glm::u16vec3); - static_swizzle2_const(glm::u16vec4); - static_swizzle2_const(glm::u32vec2); - static_swizzle2_const(glm::u32vec3); - static_swizzle2_const(glm::u32vec4); - static_swizzle2_const(glm::u64vec2); - static_swizzle2_const(glm::u64vec3); - static_swizzle2_const(glm::u64vec4); - - static_swizzle3_const(glm::f16vec2); - static_swizzle3_const(glm::f16vec3); - static_swizzle3_const(glm::f16vec4); - static_swizzle3_const(glm::f32vec2); - static_swizzle3_const(glm::f32vec3); - static_swizzle3_const(glm::f32vec4); - static_swizzle3_const(glm::f64vec2); - static_swizzle3_const(glm::f64vec3); - static_swizzle3_const(glm::f64vec4); - - static_swizzle3_const(glm::i8vec2); - static_swizzle3_const(glm::i8vec3); - static_swizzle3_const(glm::i8vec4); - static_swizzle3_const(glm::i16vec2); - static_swizzle3_const(glm::i16vec3); - static_swizzle3_const(glm::i16vec4); - static_swizzle3_const(glm::i32vec2); - static_swizzle3_const(glm::i32vec3); - static_swizzle3_const(glm::i32vec4); - static_swizzle3_const(glm::i64vec2); - static_swizzle3_const(glm::i64vec3); - static_swizzle3_const(glm::i64vec4); - - static_swizzle3_const(glm::u8vec2); - static_swizzle3_const(glm::u8vec3); - static_swizzle3_const(glm::u8vec4); - static_swizzle3_const(glm::u16vec2); - static_swizzle3_const(glm::u16vec3); - static_swizzle3_const(glm::u16vec4); - static_swizzle3_const(glm::u32vec2); - static_swizzle3_const(glm::u32vec3); - static_swizzle3_const(glm::u32vec4); - static_swizzle3_const(glm::u64vec2); - static_swizzle3_const(glm::u64vec3); - static_swizzle3_const(glm::u64vec4); - - static_swizzle4_const(glm::f16vec2); - static_swizzle4_const(glm::f16vec3); - static_swizzle4_const(glm::f16vec4); - static_swizzle4_const(glm::f32vec2); - static_swizzle4_const(glm::f32vec3); - static_swizzle4_const(glm::f32vec4); - static_swizzle4_const(glm::f64vec2); - static_swizzle4_const(glm::f64vec3); - static_swizzle4_const(glm::f64vec4); - - static_swizzle4_const(glm::i8vec2); - static_swizzle4_const(glm::i8vec3); - static_swizzle4_const(glm::i8vec4); - static_swizzle4_const(glm::i16vec2); - static_swizzle4_const(glm::i16vec3); - static_swizzle4_const(glm::i16vec4); - static_swizzle4_const(glm::i32vec2); - static_swizzle4_const(glm::i32vec3); - static_swizzle4_const(glm::i32vec4); - static_swizzle4_const(glm::i64vec2); - static_swizzle4_const(glm::i64vec3); - static_swizzle4_const(glm::i64vec4); - - static_swizzle4_const(glm::u8vec2); - static_swizzle4_const(glm::u8vec3); - static_swizzle4_const(glm::u8vec4); - static_swizzle4_const(glm::u16vec2); - static_swizzle4_const(glm::u16vec3); - static_swizzle4_const(glm::u16vec4); - static_swizzle4_const(glm::u32vec2); - static_swizzle4_const(glm::u32vec3); - static_swizzle4_const(glm::u32vec4); - static_swizzle4_const(glm::u64vec2); - static_swizzle4_const(glm::u64vec3); - static_swizzle4_const(glm::u64vec4); + static_swizzle2_const(glm::f16vec2) + static_swizzle2_const(glm::f16vec3) + static_swizzle2_const(glm::f16vec4) + static_swizzle2_const(glm::f32vec2) + static_swizzle2_const(glm::f32vec3) + static_swizzle2_const(glm::f32vec4) + static_swizzle2_const(glm::f64vec2) + static_swizzle2_const(glm::f64vec3) + static_swizzle2_const(glm::f64vec4) + + static_swizzle2_const(glm::i8vec2) + static_swizzle2_const(glm::i8vec3) + static_swizzle2_const(glm::i8vec4) + static_swizzle2_const(glm::i16vec2) + static_swizzle2_const(glm::i16vec3) + static_swizzle2_const(glm::i16vec4) + static_swizzle2_const(glm::i32vec2) + static_swizzle2_const(glm::i32vec3) + static_swizzle2_const(glm::i32vec4) + static_swizzle2_const(glm::i64vec2) + static_swizzle2_const(glm::i64vec3) + static_swizzle2_const(glm::i64vec4) + + static_swizzle2_const(glm::u8vec2) + static_swizzle2_const(glm::u8vec3) + static_swizzle2_const(glm::u8vec4) + static_swizzle2_const(glm::u16vec2) + static_swizzle2_const(glm::u16vec3) + static_swizzle2_const(glm::u16vec4) + static_swizzle2_const(glm::u32vec2) + static_swizzle2_const(glm::u32vec3) + static_swizzle2_const(glm::u32vec4) + static_swizzle2_const(glm::u64vec2) + static_swizzle2_const(glm::u64vec3) + static_swizzle2_const(glm::u64vec4) + + static_swizzle3_const(glm::f16vec2) + static_swizzle3_const(glm::f16vec3) + static_swizzle3_const(glm::f16vec4) + static_swizzle3_const(glm::f32vec2) + static_swizzle3_const(glm::f32vec3) + static_swizzle3_const(glm::f32vec4) + static_swizzle3_const(glm::f64vec2) + static_swizzle3_const(glm::f64vec3) + static_swizzle3_const(glm::f64vec4) + + static_swizzle3_const(glm::i8vec2) + static_swizzle3_const(glm::i8vec3) + static_swizzle3_const(glm::i8vec4) + static_swizzle3_const(glm::i16vec2) + static_swizzle3_const(glm::i16vec3) + static_swizzle3_const(glm::i16vec4) + static_swizzle3_const(glm::i32vec2) + static_swizzle3_const(glm::i32vec3) + static_swizzle3_const(glm::i32vec4) + static_swizzle3_const(glm::i64vec2) + static_swizzle3_const(glm::i64vec3) + static_swizzle3_const(glm::i64vec4) + + static_swizzle3_const(glm::u8vec2) + static_swizzle3_const(glm::u8vec3) + static_swizzle3_const(glm::u8vec4) + static_swizzle3_const(glm::u16vec2) + static_swizzle3_const(glm::u16vec3) + static_swizzle3_const(glm::u16vec4) + static_swizzle3_const(glm::u32vec2) + static_swizzle3_const(glm::u32vec3) + static_swizzle3_const(glm::u32vec4) + static_swizzle3_const(glm::u64vec2) + static_swizzle3_const(glm::u64vec3) + static_swizzle3_const(glm::u64vec4) + + static_swizzle4_const(glm::f16vec2) + static_swizzle4_const(glm::f16vec3) + static_swizzle4_const(glm::f16vec4) + static_swizzle4_const(glm::f32vec2) + static_swizzle4_const(glm::f32vec3) + static_swizzle4_const(glm::f32vec4) + static_swizzle4_const(glm::f64vec2) + static_swizzle4_const(glm::f64vec3) + static_swizzle4_const(glm::f64vec4) + + static_swizzle4_const(glm::i8vec2) + static_swizzle4_const(glm::i8vec3) + static_swizzle4_const(glm::i8vec4) + static_swizzle4_const(glm::i16vec2) + static_swizzle4_const(glm::i16vec3) + static_swizzle4_const(glm::i16vec4) + static_swizzle4_const(glm::i32vec2) + static_swizzle4_const(glm::i32vec3) + static_swizzle4_const(glm::i32vec4) + static_swizzle4_const(glm::i64vec2) + static_swizzle4_const(glm::i64vec3) + static_swizzle4_const(glm::i64vec4) + + static_swizzle4_const(glm::u8vec2) + static_swizzle4_const(glm::u8vec3) + static_swizzle4_const(glm::u8vec4) + static_swizzle4_const(glm::u16vec2) + static_swizzle4_const(glm::u16vec3) + static_swizzle4_const(glm::u16vec4) + static_swizzle4_const(glm::u32vec2) + static_swizzle4_const(glm::u32vec3) + static_swizzle4_const(glm::u32vec4) + static_swizzle4_const(glm::u64vec2) + static_swizzle4_const(glm::u64vec3) + static_swizzle4_const(glm::u64vec4) # define static_swizzle2_ref(TYPE) \ template \ @@ -271,80 +271,80 @@ namespace glm inline glm::detail::tref4 swizzle(TYPE & v) \ {return glm::detail::tref4(v[x], v[y], v[z], v[w]);} - static_swizzle2_ref(glm::f16vec2); - static_swizzle2_ref(glm::f16vec3); - static_swizzle2_ref(glm::f16vec4); - static_swizzle2_ref(glm::f32vec2); - static_swizzle2_ref(glm::f32vec3); - static_swizzle2_ref(glm::f32vec4); - static_swizzle2_ref(glm::f64vec2); - static_swizzle2_ref(glm::f64vec3); - static_swizzle2_ref(glm::f64vec4); - - static_swizzle2_ref(glm::i8vec2); - static_swizzle2_ref(glm::i8vec3); - static_swizzle2_ref(glm::i8vec4); - static_swizzle2_ref(glm::i16vec2); - static_swizzle2_ref(glm::i16vec3); - static_swizzle2_ref(glm::i16vec4); - static_swizzle2_ref(glm::i32vec2); - static_swizzle2_ref(glm::i32vec3); - static_swizzle2_ref(glm::i32vec4); - static_swizzle2_ref(glm::i64vec2); - static_swizzle2_ref(glm::i64vec3); - static_swizzle2_ref(glm::i64vec4); - - static_swizzle2_ref(glm::u8vec2); - static_swizzle2_ref(glm::u8vec3); - static_swizzle2_ref(glm::u8vec4); - static_swizzle2_ref(glm::u16vec2); - static_swizzle2_ref(glm::u16vec3); - static_swizzle2_ref(glm::u16vec4); - static_swizzle2_ref(glm::u32vec2); - static_swizzle2_ref(glm::u32vec3); - static_swizzle2_ref(glm::u32vec4); - static_swizzle2_ref(glm::u64vec2); - static_swizzle2_ref(glm::u64vec3); - static_swizzle2_ref(glm::u64vec4); - - static_swizzle3_ref(glm::f16vec3); - static_swizzle3_ref(glm::f16vec4); - static_swizzle3_ref(glm::f32vec3); - static_swizzle3_ref(glm::f32vec4); - static_swizzle3_ref(glm::f64vec3); - static_swizzle3_ref(glm::f64vec4); - - static_swizzle3_ref(glm::i8vec3); - static_swizzle3_ref(glm::i8vec4); - static_swizzle3_ref(glm::i16vec3); - static_swizzle3_ref(glm::i16vec4); - static_swizzle3_ref(glm::i32vec3); - static_swizzle3_ref(glm::i32vec4); - static_swizzle3_ref(glm::i64vec3); - static_swizzle3_ref(glm::i64vec4); - - static_swizzle3_ref(glm::u8vec3); - static_swizzle3_ref(glm::u8vec4); - static_swizzle3_ref(glm::u16vec3); - static_swizzle3_ref(glm::u16vec4); - static_swizzle3_ref(glm::u32vec3); - static_swizzle3_ref(glm::u32vec4); - static_swizzle3_ref(glm::u64vec3); - static_swizzle3_ref(glm::u64vec4); - - static_swizzle4_ref(glm::f16vec4); - static_swizzle4_ref(glm::f32vec4); - static_swizzle4_ref(glm::f64vec4); - - static_swizzle4_ref(glm::i8vec4); - static_swizzle4_ref(glm::i16vec4); - static_swizzle4_ref(glm::i32vec4); - static_swizzle4_ref(glm::i64vec4); - - static_swizzle4_ref(glm::u8vec4); - static_swizzle4_ref(glm::u16vec4); - static_swizzle4_ref(glm::u32vec4); - static_swizzle4_ref(glm::u64vec4); + static_swizzle2_ref(glm::f16vec2) + static_swizzle2_ref(glm::f16vec3) + static_swizzle2_ref(glm::f16vec4) + static_swizzle2_ref(glm::f32vec2) + static_swizzle2_ref(glm::f32vec3) + static_swizzle2_ref(glm::f32vec4) + static_swizzle2_ref(glm::f64vec2) + static_swizzle2_ref(glm::f64vec3) + static_swizzle2_ref(glm::f64vec4) + + static_swizzle2_ref(glm::i8vec2) + static_swizzle2_ref(glm::i8vec3) + static_swizzle2_ref(glm::i8vec4) + static_swizzle2_ref(glm::i16vec2) + static_swizzle2_ref(glm::i16vec3) + static_swizzle2_ref(glm::i16vec4) + static_swizzle2_ref(glm::i32vec2) + static_swizzle2_ref(glm::i32vec3) + static_swizzle2_ref(glm::i32vec4) + static_swizzle2_ref(glm::i64vec2) + static_swizzle2_ref(glm::i64vec3) + static_swizzle2_ref(glm::i64vec4) + + static_swizzle2_ref(glm::u8vec2) + static_swizzle2_ref(glm::u8vec3) + static_swizzle2_ref(glm::u8vec4) + static_swizzle2_ref(glm::u16vec2) + static_swizzle2_ref(glm::u16vec3) + static_swizzle2_ref(glm::u16vec4) + static_swizzle2_ref(glm::u32vec2) + static_swizzle2_ref(glm::u32vec3) + static_swizzle2_ref(glm::u32vec4) + static_swizzle2_ref(glm::u64vec2) + static_swizzle2_ref(glm::u64vec3) + static_swizzle2_ref(glm::u64vec4) + + static_swizzle3_ref(glm::f16vec3) + static_swizzle3_ref(glm::f16vec4) + static_swizzle3_ref(glm::f32vec3) + static_swizzle3_ref(glm::f32vec4) + static_swizzle3_ref(glm::f64vec3) + static_swizzle3_ref(glm::f64vec4) + + static_swizzle3_ref(glm::i8vec3) + static_swizzle3_ref(glm::i8vec4) + static_swizzle3_ref(glm::i16vec3) + static_swizzle3_ref(glm::i16vec4) + static_swizzle3_ref(glm::i32vec3) + static_swizzle3_ref(glm::i32vec4) + static_swizzle3_ref(glm::i64vec3) + static_swizzle3_ref(glm::i64vec4) + + static_swizzle3_ref(glm::u8vec3) + static_swizzle3_ref(glm::u8vec4) + static_swizzle3_ref(glm::u16vec3) + static_swizzle3_ref(glm::u16vec4) + static_swizzle3_ref(glm::u32vec3) + static_swizzle3_ref(glm::u32vec4) + static_swizzle3_ref(glm::u64vec3) + static_swizzle3_ref(glm::u64vec4) + + static_swizzle4_ref(glm::f16vec4) + static_swizzle4_ref(glm::f32vec4) + static_swizzle4_ref(glm::f64vec4) + + static_swizzle4_ref(glm::i8vec4) + static_swizzle4_ref(glm::i16vec4) + static_swizzle4_ref(glm::i32vec4) + static_swizzle4_ref(glm::i64vec4) + + static_swizzle4_ref(glm::u8vec4) + static_swizzle4_ref(glm::u16vec4) + static_swizzle4_ref(glm::u32vec4) + static_swizzle4_ref(glm::u64vec4) }//namespace swizzle }//namespace gtc diff --git a/glm/gtx/simd_mat4.hpp b/glm/gtx/simd_mat4.hpp index 9c85fd66..07ef9cf5 100644 --- a/glm/gtx/simd_mat4.hpp +++ b/glm/gtx/simd_mat4.hpp @@ -34,7 +34,7 @@ namespace glm { /// 4x4 Matrix implemented using SIMD SEE intrinsics. /// \ingroup gtx_simd_mat4 - GLM_ALIGN(16) struct fmat4x4SIMD + GLM_ALIGNED_STRUCT(16) fmat4x4SIMD { enum ctor{null}; diff --git a/glm/gtx/simd_vec4.hpp b/glm/gtx/simd_vec4.hpp index bfd1d5fa..83bba03b 100644 --- a/glm/gtx/simd_vec4.hpp +++ b/glm/gtx/simd_vec4.hpp @@ -34,7 +34,7 @@ namespace glm { /// 4-dimensional vector implemented using SIMD SEE intrinsics. /// \ingroup gtx_simd_vec4 - GLM_ALIGN(4) struct fvec4SIMD + GLM_ALIGNED_STRUCT(4) fvec4SIMD { enum ctor{null}; typedef __m128 value_type; diff --git a/glm/gtx/simd_vec4.inl b/glm/gtx/simd_vec4.inl index ae5a250f..e8261fcb 100644 --- a/glm/gtx/simd_vec4.inl +++ b/glm/gtx/simd_vec4.inl @@ -285,7 +285,7 @@ namespace glm //{ // return max(-a, a); //} - detail::fvec4SIMD abs + inline detail::fvec4SIMD abs ( detail::fvec4SIMD const & x )