From da95e96fcf5319d281a34bdb67a2b1f04aa0e0ee Mon Sep 17 00:00:00 2001 From: Christophe Riccio Date: Thu, 22 Aug 2013 23:24:18 +0200 Subject: [PATCH] Fixed build on Clang and C++11 --- glm/gtc/packing.inl | 7 +++++-- glm/gtc/type_ptr.inl | 19 ++++--------------- test/gtc/gtc_packing.cpp | 1 - 3 files changed, 9 insertions(+), 18 deletions(-) diff --git a/glm/gtc/packing.inl b/glm/gtc/packing.inl index 982d96db..7013024d 100644 --- a/glm/gtc/packing.inl +++ b/glm/gtc/packing.inl @@ -262,7 +262,7 @@ namespace detail { glm::int8 Scaled(round(clamp(v ,-1.0f, 1.0f) * 127.0f)); detail::snorm1x8 Packing; - Packing.x = Scaled.x; + Packing.data = Scaled; return Packing.pack; } @@ -321,6 +321,7 @@ namespace detail float(Packing.data.z), float(Packing.data.w)); Result *= float(1.5259021896696421759365224689097e-5); // 1.0 / 65535.0 + return Result; } GLM_FUNC_QUALIFIER uint16 packSnorm1x16(float v) @@ -445,7 +446,9 @@ namespace detail GLM_FUNC_QUALIFIER vec3 unpackF11F11F10(uint32 const & v) { - + vec3 Result; + // TODO + return Result; } }//namespace glm diff --git a/glm/gtc/type_ptr.inl b/glm/gtc/type_ptr.inl index 6b3e1ac0..e2276d8c 100644 --- a/glm/gtc/type_ptr.inl +++ b/glm/gtc/type_ptr.inl @@ -286,22 +286,11 @@ namespace glm //! Return the address to the data of the matrix input. /// @see gtc_type_ptr - template - GLM_FUNC_QUALIFIER T * value_ptr(detail::tmat4x3 & mat) + template + GLM_FUNC_QUALIFIER T * value_ptr(detail::tmat4x3 & mat) { return &(mat[0].x); } - - /// Return the constant address to the data of the quaternion input. - /// @see gtc_type_ptr - template - GLM_FUNC_QUALIFIER T * value_ptr - ( - detail::tquat & q - ) - { - return &(q[0]); - } //! Return the constant address to the data of the input parameter. /// @see gtc_type_ptr @@ -316,10 +305,10 @@ namespace glm //! Return the address to the data of the quaternion input. /// @see gtc_type_ptr - template + template GLM_FUNC_QUALIFIER T * value_ptr ( - detail::tquat & q + detail::tquat & q ) { return &(q[0]); diff --git a/test/gtc/gtc_packing.cpp b/test/gtc/gtc_packing.cpp index bd401792..cbbfa8e8 100644 --- a/test/gtc/gtc_packing.cpp +++ b/test/gtc/gtc_packing.cpp @@ -26,7 +26,6 @@ /// @author Christophe Riccio /////////////////////////////////////////////////////////////////////////////////// - #include #include #include