From 0e9ad7b6a5ee4e99295fac454f46a1e3c71d72a4 Mon Sep 17 00:00:00 2001 From: Christophe Riccio Date: Thu, 19 May 2011 10:26:22 +0100 Subject: [PATCH 1/9] Fixed LLVM GCC support --- CMakeLists.txt | 2 +- glm/core/_detail.hpp | 2 +- glm/core/setup.hpp | 11 +++++++++++ glm/gtx/simd_vec4.hpp | 4 ++-- 4 files changed, 15 insertions(+), 4 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 7375f2d5..85ae87a4 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -9,7 +9,7 @@ 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 d41fa7f8..8f8a1c55 100644 --- a/glm/core/_detail.hpp +++ b/glm/core/_detail.hpp @@ -332,7 +332,7 @@ namespace detail # 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)) +#elif((GLM_COMPILER & (GLM_COMPILER_GCC | GLM_COMPILER_LLVM_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))) diff --git a/glm/core/setup.hpp b/glm/core/setup.hpp index 939738a0..7f74d979 100644 --- a/glm/core/setup.hpp +++ b/glm/core/setup.hpp @@ -328,7 +328,18 @@ # else # define GLM_ARCH GLM_ARCH_PURE # endif +#elif(GLM_COMPILER & GLM_COMPILER_LLVM_GCC) +# if(defined(__AVX__)) +# define GLM_ARCH GLM_ARCH_AVX +# elif(defined(__SSE3__)) +# define GLM_ARCH GLM_ARCH_SSE3 +# elif(defined(__SSE2__)) +# define GLM_ARCH GLM_ARCH_SSE2 +# else +# define GLM_ARCH GLM_ARCH_PURE +# endif #elif((GLM_COMPILER & GLM_COMPILER_GCC) && (defined(__i386__) || defined(__x86_64__))) +# error "GCC" # if(defined(__AVX__)) # define GLM_ARCH GLM_ARCH_AVX # elif(defined(__SSE3__)) diff --git a/glm/gtx/simd_vec4.hpp b/glm/gtx/simd_vec4.hpp index 3384e9e1..05fb99ec 100644 --- a/glm/gtx/simd_vec4.hpp +++ b/glm/gtx/simd_vec4.hpp @@ -33,7 +33,7 @@ namespace detail { /// 4-dimensional vector implemented using SIMD SEE intrinsics. /// \ingroup gtx_simd_vec4 - GLM_ALIGNED_STRUCT(4) fvec4SIMD + GLM_ALIGNED_STRUCT(16) fvec4SIMD { enum ctor{null}; typedef __m128 value_type; @@ -114,7 +114,7 @@ namespace detail namespace gtx{ namespace simd_vec4 ///< GLM_GTX_simd_vec4 extension: SIMD implementation of vec4 type. { - typedef detail::fvec4SIMD simdVec4; + typedef glm::detail::fvec4SIMD simdVec4; /// \addtogroup gtx_simd_vec4 ///@{ From 3473acdc2a4a6f97d2debb770013272b470a6ff3 Mon Sep 17 00:00:00 2001 From: Christophe Riccio Date: Sun, 22 May 2011 11:59:02 +0100 Subject: [PATCH 2/9] Fixed SIMD trunc implementation --- glm/gtx/simd_vec4.inl | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/glm/gtx/simd_vec4.inl b/glm/gtx/simd_vec4.inl index b6fb0fd8..d7b1863a 100644 --- a/glm/gtx/simd_vec4.inl +++ b/glm/gtx/simd_vec4.inl @@ -314,6 +314,8 @@ namespace glm detail::fvec4SIMD const & x ) { + //return x < 0 ? -floor(-x) : floor(x); + __m128 Flr0 = detail::sse_flr_ps(_mm_sub_ps(_mm_setzero_ps(), x.Data)); __m128 Sub0 = _mm_sub_ps(Flr0, x.Data); __m128 Flr1 = detail::sse_flr_ps(x.Data); @@ -321,7 +323,7 @@ namespace glm __m128 Cmp0 = _mm_cmplt_ps(x.Data, glm::detail::zero); __m128 Cmp1 = _mm_cmpnlt_ps(x.Data, glm::detail::zero); - __m128 And0 = _mm_and_ps(Flr0, Cmp0); + __m128 And0 = _mm_and_ps(Sub0, Cmp0); __m128 And1 = _mm_and_ps(Flr1, Cmp1); return _mm_or_ps(And0, And1); From c216e0efb7795e45231d1c70f19da02008e5c151 Mon Sep 17 00:00:00 2001 From: Christophe Riccio Date: Sun, 22 May 2011 15:02:09 +0100 Subject: [PATCH 3/9] Merge GCC LLVM and Clang detections --- glm/core/setup.hpp | 62 ++++++++++++++++++++++++---------------------- 1 file changed, 33 insertions(+), 29 deletions(-) diff --git a/glm/core/setup.hpp b/glm/core/setup.hpp index 7f74d979..38192aa5 100644 --- a/glm/core/setup.hpp +++ b/glm/core/setup.hpp @@ -43,6 +43,8 @@ // GCC defines #define GLM_COMPILER_GCC 0x02000000 +#define GLM_COMPILER_GCC_LLVM 0x02000000 +#define GLM_COMPILER_GCC_CLANG 0x02000000 #define GLM_COMPILER_GCC30 0x02000010 #define GLM_COMPILER_GCC31 0x02000020 #define GLM_COMPILER_GCC32 0x02000030 @@ -130,22 +132,19 @@ # define GLM_COMPILER GLM_COMPILER_VC # endif//_MSC_VER -#elif defined(__clang__) -# if (__clang_major__ == 2) && (__clang_minor__ == 6) -# define GLM_COMPILER GLM_COMPILER_CLANG26 -# elif (__clang_major__ == 2) && (__clang_minor__ == 7) -# define GLM_COMPILER GLM_COMPILER_CLANG27 -# elif (__clang_major__ == 2) && (__clang_minor__ == 8) -# define GLM_COMPILER GLM_COMPILER_CLANG28 -# elif (__clang_major__ == 2) && (__clang_minor__ == 9) -# define GLM_COMPILER GLM_COMPILER_CLANG29 -# endif - -#elif defined(__llvm__) -# define GLM_COMPILER GLM_COMPILER_LLVM_GCC - // G++ -#elif defined(__GNUC__) +#elif defined(__GNUC__) || defined(__llvm__) || defined(__clang__) +# if defined (__llvm__) +# pragma message("LLVM") +# define GLM_COMPILER_GCC_EXTRA GLM_COMPILER_GCC_LLVM +# elif defined (__clang__) +# pragma message("CLANG") +# define GLM_COMPILER_GCC_EXTRA GLM_COMPILER_GCC_CLANG +# else +# pragma message("GCC") +# define GLM_COMPILER_GCC_EXTRA 0 +# endif +# # if (__GNUC__ == 3) && (__GNUC_MINOR__ == 2) # define GLM_COMPILER GLM_COMPILER_GCC32 # elif (__GNUC__ == 3) && (__GNUC_MINOR__ == 3) @@ -155,29 +154,29 @@ # elif (__GNUC__ == 3) && (__GNUC_MINOR__ == 5) # define GLM_COMPILER GLM_COMPILER_GCC35 # elif (__GNUC__ == 4) && (__GNUC_MINOR__ == 0) -# define GLM_COMPILER GLM_COMPILER_GCC40 +# define GLM_COMPILER (GLM_COMPILER_GCC40 | GLM_COMPILER_GCC_EXTRA) # elif (__GNUC__ == 4) && (__GNUC_MINOR__ == 1) -# define GLM_COMPILER GLM_COMPILER_GCC41 +# define GLM_COMPILER (GLM_COMPILER_GCC41 | GLM_COMPILER_GCC_EXTRA) # elif (__GNUC__ == 4) && (__GNUC_MINOR__ == 2) -# define GLM_COMPILER GLM_COMPILER_GCC42 +# define GLM_COMPILER (GLM_COMPILER_GCC42 | GLM_COMPILER_GCC_EXTRA) # elif (__GNUC__ == 4) && (__GNUC_MINOR__ == 3) -# define GLM_COMPILER GLM_COMPILER_GCC43 +# define GLM_COMPILER (GLM_COMPILER_GCC43 | GLM_COMPILER_GCC_EXTRA) # elif (__GNUC__ == 4) && (__GNUC_MINOR__ == 4) -# define GLM_COMPILER GLM_COMPILER_GCC44 +# define GLM_COMPILER (GLM_COMPILER_GCC44 | GLM_COMPILER_GCC_EXTRA) # elif (__GNUC__ == 4) && (__GNUC_MINOR__ == 5) -# define GLM_COMPILER GLM_COMPILER_GCC45 +# define GLM_COMPILER (GLM_COMPILER_GCC45 | GLM_COMPILER_GCC_EXTRA) # elif (__GNUC__ == 4) && (__GNUC_MINOR__ == 6) -# define GLM_COMPILER GLM_COMPILER_GCC46 +# define GLM_COMPILER (GLM_COMPILER_GCC46 | GLM_COMPILER_GCC_EXTRA) # elif (__GNUC__ == 4) && (__GNUC_MINOR__ == 7) -# define GLM_COMPILER GLM_COMPILER_GCC47 +# define GLM_COMPILER (GLM_COMPILER_GCC47 | GLM_COMPILER_GCC_EXTRA) # elif (__GNUC__ == 4) && (__GNUC_MINOR__ == 8) -# define GLM_COMPILER GLM_COMPILER_GCC48 +# define GLM_COMPILER (GLM_COMPILER_GCC48 | GLM_COMPILER_GCC_EXTRA) # elif (__GNUC__ == 4) && (__GNUC_MINOR__ == 9) -# define GLM_COMPILER GLM_COMPILER_GCC49 +# define GLM_COMPILER (GLM_COMPILER_GCC49 | GLM_COMPILER_GCC_EXTRA) # elif (__GNUC__ == 5) && (__GNUC_MINOR__ == 0) -# define GLM_COMPILER GLM_COMPILER_GCC50 +# define GLM_COMPILER (GLM_COMPILER_GCC50 | GLM_COMPILER_GCC_EXTRA) # else -# define GLM_COMPILER GLM_COMPILER_GCC +# define GLM_COMPILER (GLM_COMPILER_GCC | GLM_COMPILER_GCC_EXTRA) # endif // Borland C++ @@ -218,7 +217,13 @@ # elif(GLM_COMPILER & GLM_COMPILER_LLVM_GCC) # pragma message("GLM: LLVM GCC compiler detected") # elif(GLM_COMPILER & GLM_COMPILER_GCC) -# pragma message("GLM: GCC compiler detected") +# if(GLM_COMPILER & GLM_COMPILER_GCC_LLVM) +# pragma message("GLM: LLVM GCC compiler detected") +# elif(GLM_COMPILER & GLM_COMPILER_GCC_CLANG) +# pragma message("GLM: CLANG compiler detected") +# else +# pragma message("GLM: GCC compiler detected") +# endif # elif(GLM_COMPILER & GLM_COMPILER_BC) # pragma message("GLM: Borland compiler detected but not supported") # elif(GLM_COMPILER & GLM_COMPILER_CODEWARRIOR) @@ -339,7 +344,6 @@ # define GLM_ARCH GLM_ARCH_PURE # endif #elif((GLM_COMPILER & GLM_COMPILER_GCC) && (defined(__i386__) || defined(__x86_64__))) -# error "GCC" # if(defined(__AVX__)) # define GLM_ARCH GLM_ARCH_AVX # elif(defined(__SSE3__)) From 7064dbd3a0b6be01218821c0a96087891640bc94 Mon Sep 17 00:00:00 2001 From: Christophe Riccio Date: Sun, 22 May 2011 16:21:48 +0100 Subject: [PATCH 4/9] Fixing swizzle operator on Clang... WIP --- glm/gtc/swizzle.hpp | 34 ++++++++++++++++++---------------- 1 file changed, 18 insertions(+), 16 deletions(-) diff --git a/glm/gtc/swizzle.hpp b/glm/gtc/swizzle.hpp index b3441326..b2e46b89 100644 --- a/glm/gtc/swizzle.hpp +++ b/glm/gtc/swizzle.hpp @@ -75,7 +75,7 @@ namespace swizzle ///< GLM_GTC_swizzle extension template \ GLM_FUNC_QUALIFIER TYPE& swizzle(detail::tvec##SIZE & v) \ {return v[x];} - +/* static_swizzle1(detail::float16, 2) static_swizzle1(detail::float16, 3) static_swizzle1(detail::float16, 4) @@ -126,32 +126,34 @@ namespace swizzle ///< GLM_GTC_swizzle extension template \ GLM_FUNC_QUALIFIER TYPE swizzle(TYPE const & v) \ {return TYPE(v[x], v[y], v[z], v[w]);} -/* -# define static_swizzle2_const(TYPE, SIZE) \ +*/ + +# define static_swizzle2_const(TYPE, SIZE) \ template \ GLM_FUNC_QUALIFIER detail::tvec2 swizzle(detail::tvec##SIZE const & v) \ {return detail::tvec2(v[x], v[y]);} -# define static_swizzle3_const(TYPE, SIZE) \ +# define static_swizzle3_const(TYPE, SIZE) \ template \ GLM_FUNC_QUALIFIER detail::tvec3 swizzle(detail::tvec##SIZE const & v) \ {return detail::tvec3(v[x], v[y], v[z]);} -# define static_swizzle4_const(TYPE, SIZE) \ +# define static_swizzle4_const(TYPE, SIZE) \ template \ GLM_FUNC_QUALIFIER 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::f16vec2, 2) + static_swizzle2_const(glm::f16vec3, 3) + static_swizzle2_const(glm::f16vec4, 4) + static_swizzle2_const(glm::f32vec2, 2) + static_swizzle2_const(glm::f32vec3, 3) + static_swizzle2_const(glm::f32vec4, 4) + static_swizzle2_const(glm::f64vec2, 2) + static_swizzle2_const(glm::f64vec3, 3) + static_swizzle2_const(glm::f64vec4, 4) +/* static_swizzle2_const(glm::i8vec2) static_swizzle2_const(glm::i8vec3) static_swizzle2_const(glm::i8vec4) @@ -339,7 +341,7 @@ namespace swizzle ///< GLM_GTC_swizzle extension static_swizzle4_ref(glm::u16vec4) static_swizzle4_ref(glm::u32vec4) static_swizzle4_ref(glm::u64vec4) - +*/ }//namespace swizzle }//namespace gtc }//namespace glm From f0164ad7ceda986a35b13dce839aff5c875b71b3 Mon Sep 17 00:00:00 2001 From: Christophe Riccio Date: Mon, 23 May 2011 02:36:19 +0100 Subject: [PATCH 5/9] More fixing for the swizzle operators --- glm/gtc/swizzle.hpp | 421 ++++++++++++++++++++++---------------------- 1 file changed, 211 insertions(+), 210 deletions(-) diff --git a/glm/gtc/swizzle.hpp b/glm/gtc/swizzle.hpp index b2e46b89..24d36970 100644 --- a/glm/gtc/swizzle.hpp +++ b/glm/gtc/swizzle.hpp @@ -67,62 +67,63 @@ namespace swizzle ///< GLM_GTC_swizzle extension vecType & v, comp x, comp y, comp z, comp w); -# define static_swizzle1(TYPE, SIZE) \ +# define static_swizzle1_const(TYPE, SIZE) \ template \ GLM_FUNC_QUALIFIER TYPE swizzle(detail::tvec##SIZE const & v) \ - {return v[x];} \ - \ - template \ + {return v[x];} + +# define static_swizzle1_ref(TYPE, SIZE) \ + template \ GLM_FUNC_QUALIFIER TYPE& swizzle(detail::tvec##SIZE & v) \ {return v[x];} + + static_swizzle1_ref(detail::float16, 2) + static_swizzle1_ref(detail::float16, 3) + static_swizzle1_ref(detail::float16, 4) + static_swizzle1_ref(detail::float32, 2) + static_swizzle1_ref(detail::float32, 3) + static_swizzle1_ref(detail::float32, 4) + static_swizzle1_ref(detail::float64, 2) + static_swizzle1_ref(detail::float64, 3) + static_swizzle1_ref(detail::float64, 4) + + static_swizzle1_ref(detail::int8, 2) + static_swizzle1_ref(detail::int8, 3) + static_swizzle1_ref(detail::int8, 4) + static_swizzle1_ref(detail::int16, 2) + static_swizzle1_ref(detail::int16, 3) + static_swizzle1_ref(detail::int16, 4) + static_swizzle1_ref(detail::int32, 2) + static_swizzle1_ref(detail::int32, 3) + static_swizzle1_ref(detail::int32, 4) + static_swizzle1_ref(detail::int64, 2) + static_swizzle1_ref(detail::int64, 3) + static_swizzle1_ref(detail::int64, 4) + + static_swizzle1_ref(detail::uint8, 2) + static_swizzle1_ref(detail::uint8, 3) + static_swizzle1_ref(detail::uint8, 4) + static_swizzle1_ref(detail::uint16, 2) + static_swizzle1_ref(detail::uint16, 3) + static_swizzle1_ref(detail::uint16, 4) + static_swizzle1_ref(detail::uint32, 2) + static_swizzle1_ref(detail::uint32, 3) + static_swizzle1_ref(detail::uint32, 4) + static_swizzle1_ref(detail::uint64, 2) + static_swizzle1_ref(detail::uint64, 3) + static_swizzle1_ref(detail::uint64, 4) /* - static_swizzle1(detail::float16, 2) - static_swizzle1(detail::float16, 3) - static_swizzle1(detail::float16, 4) - static_swizzle1(detail::float32, 2) - static_swizzle1(detail::float32, 3) - static_swizzle1(detail::float32, 4) - static_swizzle1(detail::float64, 2) - static_swizzle1(detail::float64, 3) - static_swizzle1(detail::float64, 4) - - static_swizzle1(detail::int8, 2) - static_swizzle1(detail::int8, 3) - static_swizzle1(detail::int8, 4) - static_swizzle1(detail::int16, 2) - static_swizzle1(detail::int16, 3) - static_swizzle1(detail::int16, 4) - static_swizzle1(detail::int32, 2) - static_swizzle1(detail::int32, 3) - static_swizzle1(detail::int32, 4) - static_swizzle1(detail::int64, 2) - static_swizzle1(detail::int64, 3) - static_swizzle1(detail::int64, 4) - - static_swizzle1(detail::uint8, 2) - static_swizzle1(detail::uint8, 3) - static_swizzle1(detail::uint8, 4) - static_swizzle1(detail::uint16, 2) - static_swizzle1(detail::uint16, 3) - static_swizzle1(detail::uint16, 4) - static_swizzle1(detail::uint32, 2) - static_swizzle1(detail::uint32, 3) - static_swizzle1(detail::uint32, 4) - static_swizzle1(detail::uint64, 2) - static_swizzle1(detail::uint64, 3) - static_swizzle1(detail::uint64, 4) - -# define static_swizzle2_const(TYPE) \ +# define static_swizzle2_const(TYPE) \ template \ GLM_FUNC_QUALIFIER TYPE swizzle(TYPE const & v) \ {return TYPE(v[x], v[y]);} -# define static_swizzle3_const(TYPE) \ +# define static_swizzle3_const(TYPE) \ template \ GLM_FUNC_QUALIFIER TYPE swizzle(TYPE const & v) \ {return TYPE(v[x], v[y], v[z]);} -# define static_swizzle4_const(TYPE) \ +# define static_swizzle4_const(TYPE) \ template \ GLM_FUNC_QUALIFIER TYPE swizzle(TYPE const & v) \ {return TYPE(v[x], v[y], v[z], v[w]);} @@ -153,195 +154,195 @@ namespace swizzle ///< GLM_GTC_swizzle extension static_swizzle2_const(glm::f64vec2, 2) static_swizzle2_const(glm::f64vec3, 3) static_swizzle2_const(glm::f64vec4, 4) -/* - 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_swizzle2_const(glm::i8vec2, 2) + static_swizzle2_const(glm::i8vec3, 3) + static_swizzle2_const(glm::i8vec4, 4) + static_swizzle2_const(glm::i16vec2, 2) + static_swizzle2_const(glm::i16vec3, 3) + static_swizzle2_const(glm::i16vec4, 4) + static_swizzle2_const(glm::i32vec2, 2) + static_swizzle2_const(glm::i32vec3, 3) + static_swizzle2_const(glm::i32vec4, 4) + static_swizzle2_const(glm::i64vec2, 2) + static_swizzle2_const(glm::i64vec3, 3) + static_swizzle2_const(glm::i64vec4, 4) - 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_swizzle2_const(glm::u8vec2, 2) + static_swizzle2_const(glm::u8vec3, 3) + static_swizzle2_const(glm::u8vec4, 4) + static_swizzle2_const(glm::u16vec2, 2) + static_swizzle2_const(glm::u16vec3, 3) + static_swizzle2_const(glm::u16vec4, 4) + static_swizzle2_const(glm::u32vec2, 2) + static_swizzle2_const(glm::u32vec3, 3) + static_swizzle2_const(glm::u32vec4, 4) + static_swizzle2_const(glm::u64vec2, 2) + static_swizzle2_const(glm::u64vec3, 3) + static_swizzle2_const(glm::u64vec4, 4) - 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::f16vec2, 2) + static_swizzle3_const(glm::f16vec3, 3) + static_swizzle3_const(glm::f16vec4, 4) + static_swizzle3_const(glm::f32vec2, 2) + static_swizzle3_const(glm::f32vec3, 3) + static_swizzle3_const(glm::f32vec4, 4) + static_swizzle3_const(glm::f64vec2, 2) + static_swizzle3_const(glm::f64vec3, 3) + static_swizzle3_const(glm::f64vec4, 4) - 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_swizzle3_const(glm::i8vec2, 2) + static_swizzle3_const(glm::i8vec3, 3) + static_swizzle3_const(glm::i8vec4, 4) + static_swizzle3_const(glm::i16vec2, 2) + static_swizzle3_const(glm::i16vec3, 3) + static_swizzle3_const(glm::i16vec4, 4) + static_swizzle3_const(glm::i32vec2, 2) + static_swizzle3_const(glm::i32vec3, 3) + static_swizzle3_const(glm::i32vec4, 4) + static_swizzle3_const(glm::i64vec2, 2) + static_swizzle3_const(glm::i64vec3, 3) + static_swizzle3_const(glm::i64vec4, 4) - 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_swizzle3_const(glm::u8vec2, 2) + static_swizzle3_const(glm::u8vec3, 3) + static_swizzle3_const(glm::u8vec4, 4) + static_swizzle3_const(glm::u16vec2, 2) + static_swizzle3_const(glm::u16vec3, 3) + static_swizzle3_const(glm::u16vec4, 4) + static_swizzle3_const(glm::u32vec2, 2) + static_swizzle3_const(glm::u32vec3, 3) + static_swizzle3_const(glm::u32vec4, 4) + static_swizzle3_const(glm::u64vec2, 2) + static_swizzle3_const(glm::u64vec3, 3) + static_swizzle3_const(glm::u64vec4, 4) - 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::f16vec2, 2) + static_swizzle4_const(glm::f16vec3, 3) + static_swizzle4_const(glm::f16vec4, 4) + static_swizzle4_const(glm::f32vec2, 2) + static_swizzle4_const(glm::f32vec3, 3) + static_swizzle4_const(glm::f32vec4, 4) + static_swizzle4_const(glm::f64vec2, 2) + static_swizzle4_const(glm::f64vec3, 3) + static_swizzle4_const(glm::f64vec4, 4) - 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_swizzle4_const(glm::i8vec2, 2) + static_swizzle4_const(glm::i8vec3, 3) + static_swizzle4_const(glm::i8vec4, 4) + static_swizzle4_const(glm::i16vec2, 2) + static_swizzle4_const(glm::i16vec3, 3) + static_swizzle4_const(glm::i16vec4, 4) + static_swizzle4_const(glm::i32vec2, 2) + static_swizzle4_const(glm::i32vec3, 3) + static_swizzle4_const(glm::i32vec4, 4) + static_swizzle4_const(glm::i64vec2, 2) + static_swizzle4_const(glm::i64vec3, 3) + static_swizzle4_const(glm::i64vec4, 4) -# define static_swizzle2_ref(TYPE) \ + static_swizzle4_const(glm::u8vec2, 2) + static_swizzle4_const(glm::u8vec3, 3) + static_swizzle4_const(glm::u8vec4, 4) + static_swizzle4_const(glm::u16vec2, 2) + static_swizzle4_const(glm::u16vec3, 3) + static_swizzle4_const(glm::u16vec4, 4) + static_swizzle4_const(glm::u32vec2, 2) + static_swizzle4_const(glm::u32vec3, 3) + static_swizzle4_const(glm::u32vec4, 4) + static_swizzle4_const(glm::u64vec2, 2) + static_swizzle4_const(glm::u64vec3, 3) + static_swizzle4_const(glm::u64vec4, 4) + +# define static_swizzle2_ref(TYPE, SIZE) \ template \ - GLM_FUNC_QUALIFIER glm::detail::tref2 swizzle(TYPE & v) \ - {return glm::detail::tref2(v[x], v[y]);} + GLM_FUNC_QUALIFIER glm::detail::tref2 swizzle(detail::tvec##SIZE & v) \ + {return glm::detail::tref2(v[x], v[y]);} -# define static_swizzle3_ref(TYPE) \ +# define static_swizzle3_ref(TYPE, SIZE) \ template \ - GLM_FUNC_QUALIFIER glm::detail::tref3 swizzle(TYPE & v) \ - {return glm::detail::tref3(v[x], v[y], v[z]);} + GLM_FUNC_QUALIFIER glm::detail::tref3 swizzle(detail::tvec##SIZE & v) \ + {return glm::detail::tref3(v[x], v[y], v[z]);} -# define static_swizzle4_ref(TYPE) \ +# define static_swizzle4_ref(TYPE, SIZE) \ template \ - GLM_FUNC_QUALIFIER glm::detail::tref4 swizzle(TYPE & v) \ - {return glm::detail::tref4(v[x], v[y], v[z], v[w]);} + GLM_FUNC_QUALIFIER glm::detail::tref4 swizzle(detail::tvec##SIZE & 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::f16vec2, 2) + static_swizzle2_ref(glm::f16vec3, 3) + static_swizzle2_ref(glm::f16vec4, 4) + static_swizzle2_ref(glm::f32vec2, 2) + static_swizzle2_ref(glm::f32vec3, 3) + static_swizzle2_ref(glm::f32vec4, 4) + static_swizzle2_ref(glm::f64vec2, 2) + static_swizzle2_ref(glm::f64vec3, 3) + static_swizzle2_ref(glm::f64vec4, 4) - 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::i8vec2, 2) + static_swizzle2_ref(glm::i8vec3, 3) + static_swizzle2_ref(glm::i8vec4, 4) + static_swizzle2_ref(glm::i16vec2, 2) + static_swizzle2_ref(glm::i16vec3, 3) + static_swizzle2_ref(glm::i16vec4, 4) + static_swizzle2_ref(glm::i32vec2, 2) + static_swizzle2_ref(glm::i32vec3, 3) + static_swizzle2_ref(glm::i32vec4, 4) + static_swizzle2_ref(glm::i64vec2, 2) + static_swizzle2_ref(glm::i64vec3, 3) + static_swizzle2_ref(glm::i64vec4, 4) - 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_swizzle2_ref(glm::u8vec2, 2) + static_swizzle2_ref(glm::u8vec3, 3) + static_swizzle2_ref(glm::u8vec4, 4) + static_swizzle2_ref(glm::u16vec2, 2) + static_swizzle2_ref(glm::u16vec3, 3) + static_swizzle2_ref(glm::u16vec4, 4) + static_swizzle2_ref(glm::u32vec2, 2) + static_swizzle2_ref(glm::u32vec3, 3) + static_swizzle2_ref(glm::u32vec4, 4) + static_swizzle2_ref(glm::u64vec2, 2) + static_swizzle2_ref(glm::u64vec3, 3) + static_swizzle2_ref(glm::u64vec4, 4) - 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::f16vec3, 3) + static_swizzle3_ref(glm::f16vec4, 4) + static_swizzle3_ref(glm::f32vec3, 3) + static_swizzle3_ref(glm::f32vec4, 4) + static_swizzle3_ref(glm::f64vec3, 3) + static_swizzle3_ref(glm::f64vec4, 4) - 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::i8vec3, 3) + static_swizzle3_ref(glm::i8vec4, 4) + static_swizzle3_ref(glm::i16vec3, 3) + static_swizzle3_ref(glm::i16vec4, 4) + static_swizzle3_ref(glm::i32vec3, 3) + static_swizzle3_ref(glm::i32vec4, 4) + static_swizzle3_ref(glm::i64vec3, 3) + static_swizzle3_ref(glm::i64vec4, 4) - 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_swizzle3_ref(glm::u8vec3, 3) + static_swizzle3_ref(glm::u8vec4, 4) + static_swizzle3_ref(glm::u16vec3, 3) + static_swizzle3_ref(glm::u16vec4, 4) + static_swizzle3_ref(glm::u32vec3, 3) + static_swizzle3_ref(glm::u32vec4, 4) + static_swizzle3_ref(glm::u64vec3, 3) + static_swizzle3_ref(glm::u64vec4, 4) - static_swizzle4_ref(glm::f16vec4) - static_swizzle4_ref(glm::f32vec4) - static_swizzle4_ref(glm::f64vec4) + static_swizzle4_ref(glm::f16vec4, 4) + static_swizzle4_ref(glm::f32vec4, 4) + static_swizzle4_ref(glm::f64vec4, 4) - static_swizzle4_ref(glm::i8vec4) - static_swizzle4_ref(glm::i16vec4) - static_swizzle4_ref(glm::i32vec4) - static_swizzle4_ref(glm::i64vec4) + static_swizzle4_ref(glm::i8vec4, 4) + static_swizzle4_ref(glm::i16vec4, 4) + static_swizzle4_ref(glm::i32vec4, 4) + static_swizzle4_ref(glm::i64vec4, 4) + + static_swizzle4_ref(glm::u8vec4, 4) + static_swizzle4_ref(glm::u16vec4, 4) + static_swizzle4_ref(glm::u32vec4, 4) + static_swizzle4_ref(glm::u64vec4, 4) - static_swizzle4_ref(glm::u8vec4) - static_swizzle4_ref(glm::u16vec4) - static_swizzle4_ref(glm::u32vec4) - static_swizzle4_ref(glm::u64vec4) -*/ }//namespace swizzle }//namespace gtc }//namespace glm From 95889e3570a9a317f87202d611c0223a90c1d2f2 Mon Sep 17 00:00:00 2001 From: Christophe Riccio Date: Mon, 23 May 2011 10:16:52 +0100 Subject: [PATCH 6/9] Fixed last glitch in Clang support --- glm/gtc/swizzle.hpp | 330 ++++++++++++++++++++++---------------------- 1 file changed, 165 insertions(+), 165 deletions(-) diff --git a/glm/gtc/swizzle.hpp b/glm/gtc/swizzle.hpp index 24d36970..bd4cfb83 100644 --- a/glm/gtc/swizzle.hpp +++ b/glm/gtc/swizzle.hpp @@ -145,113 +145,113 @@ namespace swizzle ///< GLM_GTC_swizzle extension {return detail::tvec4(v[x], v[y], v[z], v[w]);} - static_swizzle2_const(glm::f16vec2, 2) - static_swizzle2_const(glm::f16vec3, 3) - static_swizzle2_const(glm::f16vec4, 4) - static_swizzle2_const(glm::f32vec2, 2) - static_swizzle2_const(glm::f32vec3, 3) - static_swizzle2_const(glm::f32vec4, 4) - static_swizzle2_const(glm::f64vec2, 2) - static_swizzle2_const(glm::f64vec3, 3) - static_swizzle2_const(glm::f64vec4, 4) + static_swizzle2_const(glm::f16, 2) + static_swizzle2_const(glm::f16, 3) + static_swizzle2_const(glm::f16, 4) + static_swizzle2_const(glm::f32, 2) + static_swizzle2_const(glm::f32, 3) + static_swizzle2_const(glm::f32, 4) + static_swizzle2_const(glm::f64, 2) + static_swizzle2_const(glm::f64, 3) + static_swizzle2_const(glm::f64, 4) - static_swizzle2_const(glm::i8vec2, 2) - static_swizzle2_const(glm::i8vec3, 3) - static_swizzle2_const(glm::i8vec4, 4) - static_swizzle2_const(glm::i16vec2, 2) - static_swizzle2_const(glm::i16vec3, 3) - static_swizzle2_const(glm::i16vec4, 4) - static_swizzle2_const(glm::i32vec2, 2) - static_swizzle2_const(glm::i32vec3, 3) - static_swizzle2_const(glm::i32vec4, 4) - static_swizzle2_const(glm::i64vec2, 2) - static_swizzle2_const(glm::i64vec3, 3) - static_swizzle2_const(glm::i64vec4, 4) + static_swizzle2_const(glm::i8, 2) + static_swizzle2_const(glm::i8, 3) + static_swizzle2_const(glm::i8, 4) + static_swizzle2_const(glm::i16, 2) + static_swizzle2_const(glm::i16, 3) + static_swizzle2_const(glm::i16, 4) + static_swizzle2_const(glm::i32, 2) + static_swizzle2_const(glm::i32, 3) + static_swizzle2_const(glm::i32, 4) + static_swizzle2_const(glm::i64, 2) + static_swizzle2_const(glm::i64, 3) + static_swizzle2_const(glm::i64, 4) - static_swizzle2_const(glm::u8vec2, 2) - static_swizzle2_const(glm::u8vec3, 3) - static_swizzle2_const(glm::u8vec4, 4) - static_swizzle2_const(glm::u16vec2, 2) - static_swizzle2_const(glm::u16vec3, 3) - static_swizzle2_const(glm::u16vec4, 4) - static_swizzle2_const(glm::u32vec2, 2) - static_swizzle2_const(glm::u32vec3, 3) - static_swizzle2_const(glm::u32vec4, 4) - static_swizzle2_const(glm::u64vec2, 2) - static_swizzle2_const(glm::u64vec3, 3) - static_swizzle2_const(glm::u64vec4, 4) + static_swizzle2_const(glm::u8, 2) + static_swizzle2_const(glm::u8, 3) + static_swizzle2_const(glm::u8, 4) + static_swizzle2_const(glm::u16, 2) + static_swizzle2_const(glm::u16, 3) + static_swizzle2_const(glm::u16, 4) + static_swizzle2_const(glm::u32, 2) + static_swizzle2_const(glm::u32, 3) + static_swizzle2_const(glm::u32, 4) + static_swizzle2_const(glm::u64, 2) + static_swizzle2_const(glm::u64, 3) + static_swizzle2_const(glm::u64, 4) - static_swizzle3_const(glm::f16vec2, 2) - static_swizzle3_const(glm::f16vec3, 3) - static_swizzle3_const(glm::f16vec4, 4) - static_swizzle3_const(glm::f32vec2, 2) - static_swizzle3_const(glm::f32vec3, 3) - static_swizzle3_const(glm::f32vec4, 4) - static_swizzle3_const(glm::f64vec2, 2) - static_swizzle3_const(glm::f64vec3, 3) - static_swizzle3_const(glm::f64vec4, 4) + static_swizzle3_const(glm::f16, 2) + static_swizzle3_const(glm::f16, 3) + static_swizzle3_const(glm::f16, 4) + static_swizzle3_const(glm::f32, 2) + static_swizzle3_const(glm::f32, 3) + static_swizzle3_const(glm::f32, 4) + static_swizzle3_const(glm::f64, 2) + static_swizzle3_const(glm::f64, 3) + static_swizzle3_const(glm::f64, 4) - static_swizzle3_const(glm::i8vec2, 2) - static_swizzle3_const(glm::i8vec3, 3) - static_swizzle3_const(glm::i8vec4, 4) - static_swizzle3_const(glm::i16vec2, 2) - static_swizzle3_const(glm::i16vec3, 3) - static_swizzle3_const(glm::i16vec4, 4) - static_swizzle3_const(glm::i32vec2, 2) - static_swizzle3_const(glm::i32vec3, 3) - static_swizzle3_const(glm::i32vec4, 4) - static_swizzle3_const(glm::i64vec2, 2) - static_swizzle3_const(glm::i64vec3, 3) - static_swizzle3_const(glm::i64vec4, 4) + static_swizzle3_const(glm::i8, 2) + static_swizzle3_const(glm::i8, 3) + static_swizzle3_const(glm::i8, 4) + static_swizzle3_const(glm::i16, 2) + static_swizzle3_const(glm::i16, 3) + static_swizzle3_const(glm::i16, 4) + static_swizzle3_const(glm::i32, 2) + static_swizzle3_const(glm::i32, 3) + static_swizzle3_const(glm::i32, 4) + static_swizzle3_const(glm::i64, 2) + static_swizzle3_const(glm::i64, 3) + static_swizzle3_const(glm::i64, 4) - static_swizzle3_const(glm::u8vec2, 2) - static_swizzle3_const(glm::u8vec3, 3) - static_swizzle3_const(glm::u8vec4, 4) - static_swizzle3_const(glm::u16vec2, 2) - static_swizzle3_const(glm::u16vec3, 3) - static_swizzle3_const(glm::u16vec4, 4) - static_swizzle3_const(glm::u32vec2, 2) - static_swizzle3_const(glm::u32vec3, 3) - static_swizzle3_const(glm::u32vec4, 4) - static_swizzle3_const(glm::u64vec2, 2) - static_swizzle3_const(glm::u64vec3, 3) - static_swizzle3_const(glm::u64vec4, 4) + static_swizzle3_const(glm::u8, 2) + static_swizzle3_const(glm::u8, 3) + static_swizzle3_const(glm::u8, 4) + static_swizzle3_const(glm::u16, 2) + static_swizzle3_const(glm::u16, 3) + static_swizzle3_const(glm::u16, 4) + static_swizzle3_const(glm::u32, 2) + static_swizzle3_const(glm::u32, 3) + static_swizzle3_const(glm::u32, 4) + static_swizzle3_const(glm::u64, 2) + static_swizzle3_const(glm::u64, 3) + static_swizzle3_const(glm::u64, 4) - static_swizzle4_const(glm::f16vec2, 2) - static_swizzle4_const(glm::f16vec3, 3) - static_swizzle4_const(glm::f16vec4, 4) - static_swizzle4_const(glm::f32vec2, 2) - static_swizzle4_const(glm::f32vec3, 3) - static_swizzle4_const(glm::f32vec4, 4) - static_swizzle4_const(glm::f64vec2, 2) - static_swizzle4_const(glm::f64vec3, 3) - static_swizzle4_const(glm::f64vec4, 4) + static_swizzle4_const(glm::f16, 2) + static_swizzle4_const(glm::f16, 3) + static_swizzle4_const(glm::f16, 4) + static_swizzle4_const(glm::f32, 2) + static_swizzle4_const(glm::f32, 3) + static_swizzle4_const(glm::f32, 4) + static_swizzle4_const(glm::f64, 2) + static_swizzle4_const(glm::f64, 3) + static_swizzle4_const(glm::f64, 4) - static_swizzle4_const(glm::i8vec2, 2) - static_swizzle4_const(glm::i8vec3, 3) - static_swizzle4_const(glm::i8vec4, 4) - static_swizzle4_const(glm::i16vec2, 2) - static_swizzle4_const(glm::i16vec3, 3) - static_swizzle4_const(glm::i16vec4, 4) - static_swizzle4_const(glm::i32vec2, 2) - static_swizzle4_const(glm::i32vec3, 3) - static_swizzle4_const(glm::i32vec4, 4) - static_swizzle4_const(glm::i64vec2, 2) - static_swizzle4_const(glm::i64vec3, 3) - static_swizzle4_const(glm::i64vec4, 4) + static_swizzle4_const(glm::i8, 2) + static_swizzle4_const(glm::i8, 3) + static_swizzle4_const(glm::i8, 4) + static_swizzle4_const(glm::i16, 2) + static_swizzle4_const(glm::i16, 3) + static_swizzle4_const(glm::i16, 4) + static_swizzle4_const(glm::i32, 2) + static_swizzle4_const(glm::i32, 3) + static_swizzle4_const(glm::i32, 4) + static_swizzle4_const(glm::i64, 2) + static_swizzle4_const(glm::i64, 3) + static_swizzle4_const(glm::i64, 4) - static_swizzle4_const(glm::u8vec2, 2) - static_swizzle4_const(glm::u8vec3, 3) - static_swizzle4_const(glm::u8vec4, 4) - static_swizzle4_const(glm::u16vec2, 2) - static_swizzle4_const(glm::u16vec3, 3) - static_swizzle4_const(glm::u16vec4, 4) - static_swizzle4_const(glm::u32vec2, 2) - static_swizzle4_const(glm::u32vec3, 3) - static_swizzle4_const(glm::u32vec4, 4) - static_swizzle4_const(glm::u64vec2, 2) - static_swizzle4_const(glm::u64vec3, 3) - static_swizzle4_const(glm::u64vec4, 4) + static_swizzle4_const(glm::u8, 2) + static_swizzle4_const(glm::u8, 3) + static_swizzle4_const(glm::u8, 4) + static_swizzle4_const(glm::u16, 2) + static_swizzle4_const(glm::u16, 3) + static_swizzle4_const(glm::u16, 4) + static_swizzle4_const(glm::u32, 2) + static_swizzle4_const(glm::u32, 3) + static_swizzle4_const(glm::u32, 4) + static_swizzle4_const(glm::u64, 2) + static_swizzle4_const(glm::u64, 3) + static_swizzle4_const(glm::u64, 4) # define static_swizzle2_ref(TYPE, SIZE) \ template \ @@ -268,80 +268,80 @@ namespace swizzle ///< GLM_GTC_swizzle extension GLM_FUNC_QUALIFIER glm::detail::tref4 swizzle(detail::tvec##SIZE & v) \ {return glm::detail::tref4(v[x], v[y], v[z], v[w]);} - static_swizzle2_ref(glm::f16vec2, 2) - static_swizzle2_ref(glm::f16vec3, 3) - static_swizzle2_ref(glm::f16vec4, 4) - static_swizzle2_ref(glm::f32vec2, 2) - static_swizzle2_ref(glm::f32vec3, 3) - static_swizzle2_ref(glm::f32vec4, 4) - static_swizzle2_ref(glm::f64vec2, 2) - static_swizzle2_ref(glm::f64vec3, 3) - static_swizzle2_ref(glm::f64vec4, 4) + static_swizzle2_ref(glm::f16, 2) + static_swizzle2_ref(glm::f16, 3) + static_swizzle2_ref(glm::f16, 4) + static_swizzle2_ref(glm::f32, 2) + static_swizzle2_ref(glm::f32, 3) + static_swizzle2_ref(glm::f32, 4) + static_swizzle2_ref(glm::f64, 2) + static_swizzle2_ref(glm::f64, 3) + static_swizzle2_ref(glm::f64, 4) - static_swizzle2_ref(glm::i8vec2, 2) - static_swizzle2_ref(glm::i8vec3, 3) - static_swizzle2_ref(glm::i8vec4, 4) - static_swizzle2_ref(glm::i16vec2, 2) - static_swizzle2_ref(glm::i16vec3, 3) - static_swizzle2_ref(glm::i16vec4, 4) - static_swizzle2_ref(glm::i32vec2, 2) - static_swizzle2_ref(glm::i32vec3, 3) - static_swizzle2_ref(glm::i32vec4, 4) - static_swizzle2_ref(glm::i64vec2, 2) - static_swizzle2_ref(glm::i64vec3, 3) - static_swizzle2_ref(glm::i64vec4, 4) + static_swizzle2_ref(glm::i8, 2) + static_swizzle2_ref(glm::i8, 3) + static_swizzle2_ref(glm::i8, 4) + static_swizzle2_ref(glm::i16, 2) + static_swizzle2_ref(glm::i16, 3) + static_swizzle2_ref(glm::i16, 4) + static_swizzle2_ref(glm::i32, 2) + static_swizzle2_ref(glm::i32, 3) + static_swizzle2_ref(glm::i32, 4) + static_swizzle2_ref(glm::i64, 2) + static_swizzle2_ref(glm::i64, 3) + static_swizzle2_ref(glm::i64, 4) - static_swizzle2_ref(glm::u8vec2, 2) - static_swizzle2_ref(glm::u8vec3, 3) - static_swizzle2_ref(glm::u8vec4, 4) - static_swizzle2_ref(glm::u16vec2, 2) - static_swizzle2_ref(glm::u16vec3, 3) - static_swizzle2_ref(glm::u16vec4, 4) - static_swizzle2_ref(glm::u32vec2, 2) - static_swizzle2_ref(glm::u32vec3, 3) - static_swizzle2_ref(glm::u32vec4, 4) - static_swizzle2_ref(glm::u64vec2, 2) - static_swizzle2_ref(glm::u64vec3, 3) - static_swizzle2_ref(glm::u64vec4, 4) + static_swizzle2_ref(glm::u8, 2) + static_swizzle2_ref(glm::u8, 3) + static_swizzle2_ref(glm::u8, 4) + static_swizzle2_ref(glm::u16, 2) + static_swizzle2_ref(glm::u16, 3) + static_swizzle2_ref(glm::u16, 4) + static_swizzle2_ref(glm::u32, 2) + static_swizzle2_ref(glm::u32, 3) + static_swizzle2_ref(glm::u32, 4) + static_swizzle2_ref(glm::u64, 2) + static_swizzle2_ref(glm::u64, 3) + static_swizzle2_ref(glm::u64, 4) - static_swizzle3_ref(glm::f16vec3, 3) - static_swizzle3_ref(glm::f16vec4, 4) - static_swizzle3_ref(glm::f32vec3, 3) - static_swizzle3_ref(glm::f32vec4, 4) - static_swizzle3_ref(glm::f64vec3, 3) - static_swizzle3_ref(glm::f64vec4, 4) + static_swizzle3_ref(glm::f16, 3) + static_swizzle3_ref(glm::f16, 4) + static_swizzle3_ref(glm::f32, 3) + static_swizzle3_ref(glm::f32, 4) + static_swizzle3_ref(glm::f64, 3) + static_swizzle3_ref(glm::f64, 4) - static_swizzle3_ref(glm::i8vec3, 3) - static_swizzle3_ref(glm::i8vec4, 4) - static_swizzle3_ref(glm::i16vec3, 3) - static_swizzle3_ref(glm::i16vec4, 4) - static_swizzle3_ref(glm::i32vec3, 3) - static_swizzle3_ref(glm::i32vec4, 4) - static_swizzle3_ref(glm::i64vec3, 3) - static_swizzle3_ref(glm::i64vec4, 4) + static_swizzle3_ref(glm::i8, 3) + static_swizzle3_ref(glm::i8, 4) + static_swizzle3_ref(glm::i16, 3) + static_swizzle3_ref(glm::i16, 4) + static_swizzle3_ref(glm::i32, 3) + static_swizzle3_ref(glm::i32, 4) + static_swizzle3_ref(glm::i64, 3) + static_swizzle3_ref(glm::i64, 4) - static_swizzle3_ref(glm::u8vec3, 3) - static_swizzle3_ref(glm::u8vec4, 4) - static_swizzle3_ref(glm::u16vec3, 3) - static_swizzle3_ref(glm::u16vec4, 4) - static_swizzle3_ref(glm::u32vec3, 3) - static_swizzle3_ref(glm::u32vec4, 4) - static_swizzle3_ref(glm::u64vec3, 3) - static_swizzle3_ref(glm::u64vec4, 4) + static_swizzle3_ref(glm::u8, 3) + static_swizzle3_ref(glm::u8, 4) + static_swizzle3_ref(glm::u16, 3) + static_swizzle3_ref(glm::u16, 4) + static_swizzle3_ref(glm::u32, 3) + static_swizzle3_ref(glm::u32, 4) + static_swizzle3_ref(glm::u64, 3) + static_swizzle3_ref(glm::u64, 4) - static_swizzle4_ref(glm::f16vec4, 4) - static_swizzle4_ref(glm::f32vec4, 4) - static_swizzle4_ref(glm::f64vec4, 4) + static_swizzle4_ref(glm::f16, 4) + static_swizzle4_ref(glm::f32, 4) + static_swizzle4_ref(glm::f64, 4) - static_swizzle4_ref(glm::i8vec4, 4) - static_swizzle4_ref(glm::i16vec4, 4) - static_swizzle4_ref(glm::i32vec4, 4) - static_swizzle4_ref(glm::i64vec4, 4) + static_swizzle4_ref(glm::i8, 4) + static_swizzle4_ref(glm::i16, 4) + static_swizzle4_ref(glm::i32, 4) + static_swizzle4_ref(glm::i64, 4) - static_swizzle4_ref(glm::u8vec4, 4) - static_swizzle4_ref(glm::u16vec4, 4) - static_swizzle4_ref(glm::u32vec4, 4) - static_swizzle4_ref(glm::u64vec4, 4) + static_swizzle4_ref(glm::u8, 4) + static_swizzle4_ref(glm::u16, 4) + static_swizzle4_ref(glm::u32, 4) + static_swizzle4_ref(glm::u64, 4) }//namespace swizzle }//namespace gtc From a87ce5d1646815fbe503a4545eb24dac6151987b Mon Sep 17 00:00:00 2001 From: Christophe Riccio Date: Tue, 24 May 2011 12:19:51 +0100 Subject: [PATCH 7/9] Updated documentation for GLM 0.9.2.1 release --- doc/about.html | 7 ++++--- doc/code.html | 4 ++-- doc/download.html | 12 +++++++----- doc/glm-0.9.2.pdf | Bin 396140 -> 360382 bytes doc/goodies.html | 4 ++-- doc/index.html | 14 ++++++++++---- doc/src/data.xml | 22 +++++++++++++++++++--- readme.txt | 27 +++++++++++++++++++++++++-- 8 files changed, 69 insertions(+), 21 deletions(-) diff --git a/doc/about.html b/doc/about.html index cdbfb48f..f0899b4c 100644 --- a/doc/about.html +++ b/doc/about.html @@ -11,8 +11,8 @@ ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); })(); -
OpenGL Mathematics
GLSL + Optional features = OpenGL Mathematics (GLM).
A C++ mathematics library for 3D graphics.


+
OpenGL Mathematics
GLSL + Optional features = OpenGL Mathematics (GLM).
A C++ mathematics library for graphics programming.


OpenGL Mathematics (GLM) is a header only C++ mathematics library for graphics software based on the OpenGL Shading Language (GLSL) specification.

@@ -32,4 +32,5 @@

Thanks for contributing to the project by submitting tickets for bug reports and feature requests. (SF.net account required). Any feedback is welcome at glm@g-truc.net. -

GLM is written as a platform independent library with no dependence and officially supports the following compilers:
  • GCC 3.4 and higher
  • LLVM 2.3 through GCC 4.2 front-end and higher
  • Visual C++ 2005 and higher
  • Any C++ compiler following C++98 norm
_________________

_________________

Copyright © 2005 - 2011G-Truc Creation
\ No newline at end of file +

GLM is written as a platform independent library with no dependence and officially supports the following compilers:
  • Clang 2.0 and higher
  • CUDA 3.0 and higher +
  • GCC 3.4 and higher
  • LLVM 2.3 through GCC 4.2 front-end and higher
  • Visual C++ 2005 and higher
  • Any C++ compiler following C++98 norm
_________________

_________________

Copyright © 2005 - 2011G-Truc Creation
\ No newline at end of file diff --git a/doc/code.html b/doc/code.html index a07bc9f2..de70f715 100644 --- a/doc/code.html +++ b/doc/code.html @@ -11,8 +11,8 @@ ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); })(); -
OpenGL Mathematics
GLSL + Optional features = OpenGL Mathematics (GLM).
A C++ mathematics library for 3D graphics.


Compute a triangle normal: