From 5a48614f57cff4318b922efa6e6ef40863c33b39 Mon Sep 17 00:00:00 2001 From: tszirr Date: Fri, 21 Jun 2013 17:17:34 +0200 Subject: [PATCH] fix: component declaration order -> debug display order! --- glm/core/type_vec2.hpp | 8 ++++---- glm/core/type_vec3.hpp | 8 ++++---- glm/core/type_vec4.hpp | 8 ++++---- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/glm/core/type_vec2.hpp b/glm/core/type_vec2.hpp index 97b9fa8f..3f8083d8 100644 --- a/glm/core/type_vec2.hpp +++ b/glm/core/type_vec2.hpp @@ -62,6 +62,10 @@ namespace detail # if(GLM_COMPONENT == GLM_COMPONENT_CXX11) union { + struct{value_type x, y;}; + struct{value_type r, g;}; + struct{value_type s, t;}; + # if(defined(GLM_SWIZZLE)) _GLM_SWIZZLE2_2_MEMBERS(value_type, glm::detail::tvec2, x, y) _GLM_SWIZZLE2_2_MEMBERS(value_type, glm::detail::tvec2, r, g) @@ -73,10 +77,6 @@ namespace detail _GLM_SWIZZLE2_4_MEMBERS(value_type, glm::detail::tvec4, r, g) _GLM_SWIZZLE2_4_MEMBERS(value_type, glm::detail::tvec4, s, t) # endif//(defined(GLM_SWIZZLE)) - - struct{value_type r, g;}; - struct{value_type s, t;}; - struct{value_type x, y;}; }; # elif(GLM_COMPONENT == GLM_COMPONENT_CXX98) union {value_type x, r, s;}; diff --git a/glm/core/type_vec3.hpp b/glm/core/type_vec3.hpp index 26c9a219..7165fa5d 100644 --- a/glm/core/type_vec3.hpp +++ b/glm/core/type_vec3.hpp @@ -62,6 +62,10 @@ namespace detail # if(GLM_COMPONENT == GLM_COMPONENT_CXX11) union { + struct{value_type x, y, z;}; + struct{value_type r, g, b;}; + struct{value_type s, t, p;}; + # if(defined(GLM_SWIZZLE)) _GLM_SWIZZLE3_2_MEMBERS(value_type, glm::detail::tvec2, x, y, z) _GLM_SWIZZLE3_2_MEMBERS(value_type, glm::detail::tvec2, r, g, b) @@ -73,10 +77,6 @@ namespace detail _GLM_SWIZZLE3_4_MEMBERS(value_type, glm::detail::tvec4, r, g, b) _GLM_SWIZZLE3_4_MEMBERS(value_type, glm::detail::tvec4, s, t, p) # endif//(defined(GLM_SWIZZLE)) - - struct{value_type r, g, b;}; - struct{value_type s, t, p;}; - struct{value_type x, y, z;}; }; # elif(GLM_COMPONENT == GLM_COMPONENT_CXX98) union {value_type x, r, s;}; diff --git a/glm/core/type_vec4.hpp b/glm/core/type_vec4.hpp index d7d092a2..c8860e22 100644 --- a/glm/core/type_vec4.hpp +++ b/glm/core/type_vec4.hpp @@ -62,6 +62,10 @@ namespace detail # if(GLM_COMPONENT == GLM_COMPONENT_CXX11) union { + struct{value_type x, y, z, w;}; + struct{value_type r, g, b, a;}; + struct{value_type s, t, p, q;}; + # if(defined(GLM_SWIZZLE)) _GLM_SWIZZLE4_2_MEMBERS(value_type, glm::detail::tvec2, x, y, z, w) _GLM_SWIZZLE4_2_MEMBERS(value_type, glm::detail::tvec2, r, g, b, a) @@ -73,10 +77,6 @@ namespace detail _GLM_SWIZZLE4_4_MEMBERS(value_type, glm::detail::tvec4, r, g, b, a) _GLM_SWIZZLE4_4_MEMBERS(value_type, glm::detail::tvec4, s, t, p, q) # endif//(defined(GLM_SWIZZLE)) - - struct{value_type r, g, b, a;}; - struct{value_type s, t, p, q;}; - struct{value_type x, y, z, w;}; }; # elif(GLM_COMPONENT == GLM_COMPONENT_CXX98) union {value_type x, r, s;};