From 889a7594d9f156339f68c965d4a7915eda6260fe Mon Sep 17 00:00:00 2001 From: Christophe Riccio Date: Wed, 2 Jan 2013 00:05:07 +0000 Subject: [PATCH 1/6] Fixed bug #34, GLM_FORCE_RADIANS not working on glm::perspective --- glm/gtc/matrix_transform.inl | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/glm/gtc/matrix_transform.inl b/glm/gtc/matrix_transform.inl index 2245a4f9..790ecf55 100644 --- a/glm/gtc/matrix_transform.inl +++ b/glm/gtc/matrix_transform.inl @@ -236,7 +236,13 @@ namespace glm valType const & zFar ) { - valType range = tan(radians(fovy / valType(2))) * zNear; +#ifdef GLM_FORCE_RADIANS + valType const rad = fov; +#else + valType const rad = glm::radians(fov); +#endif + + valType range = tan(radians(rad / valType(2))) * zNear; valType left = -range * aspect; valType right = range * aspect; valType bottom = -range; From a7feb46c1a945a616c8e0e3fcff32d52e34c9af6 Mon Sep 17 00:00:00 2001 From: Christophe Riccio Date: Fri, 4 Jan 2013 14:26:18 +0000 Subject: [PATCH 2/6] Fixed build --- glm/gtc/matrix_transform.inl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/glm/gtc/matrix_transform.inl b/glm/gtc/matrix_transform.inl index 790ecf55..90af5db6 100644 --- a/glm/gtc/matrix_transform.inl +++ b/glm/gtc/matrix_transform.inl @@ -237,9 +237,9 @@ namespace glm ) { #ifdef GLM_FORCE_RADIANS - valType const rad = fov; + valType const rad = fovy; #else - valType const rad = glm::radians(fov); + valType const rad = glm::radians(fovy); #endif valType range = tan(radians(rad / valType(2))) * zNear; From 115c7fc64ace8d9742872863f3f6bc889e9d6835 Mon Sep 17 00:00:00 2001 From: Christophe Riccio Date: Mon, 7 Jan 2013 23:24:27 +0000 Subject: [PATCH 3/6] Added specific code path to isnan and isinf for CUDA, issue #35 --- glm/core/func_common.inl | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/glm/core/func_common.inl b/glm/core/func_common.inl index 9c1c0470..2e2d31c5 100644 --- a/glm/core/func_common.inl +++ b/glm/core/func_common.inl @@ -811,6 +811,8 @@ namespace detail # else return std::isnan(x); # endif +# elif(GLM_COMPILER & GLM_COMPILER_CUDA) + return isnan(x) != 0; # else return std::isnan(x); # endif @@ -866,6 +868,9 @@ namespace detail # else return std::isinf(x); # endif +# elif(GLM_COMPILER & GLM_COMPILER_CUDA) + // http://developer.download.nvidia.com/compute/cuda/4_2/rel/toolkit/docs/online/group__CUDA__MATH__DOUBLE_g13431dd2b40b51f9139cbb7f50c18fab.html#g13431dd2b40b51f9139cbb7f50c18fab + return isinf(double(x)) != 0; # else return std::isinf(x); # endif From 6c855a892d957b0dcdf48b8e27a55cd22c2b4fbf Mon Sep 17 00:00:00 2001 From: Christophe Riccio Date: Mon, 7 Jan 2013 23:29:29 +0000 Subject: [PATCH 4/6] Updated revision number for GLM 0.9.4.2 release --- glm/core/setup.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/glm/core/setup.hpp b/glm/core/setup.hpp index a52e9de9..ebb9f2ae 100644 --- a/glm/core/setup.hpp +++ b/glm/core/setup.hpp @@ -36,7 +36,7 @@ #define GLM_VERSION_MAJOR 0 #define GLM_VERSION_MINOR 9 #define GLM_VERSION_PATCH 4 -#define GLM_VERSION_REVISION 0 +#define GLM_VERSION_REVISION 2 /////////////////////////////////////////////////////////////////////////////////////////////////// // Platform From 9a625f4d5b28b507cb51de0b855bc43f806c69c9 Mon Sep 17 00:00:00 2001 From: Christophe Riccio Date: Mon, 7 Jan 2013 23:37:59 +0000 Subject: [PATCH 5/6] Fixed SIMD support for Intel compiler on Windows, issue #32 --- glm/core/_detail.hpp | 7 +++++++ readme.txt | 7 ++++++- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/glm/core/_detail.hpp b/glm/core/_detail.hpp index ecc9250e..ad8f19e3 100644 --- a/glm/core/_detail.hpp +++ b/glm/core/_detail.hpp @@ -445,6 +445,13 @@ namespace detail # define GLM_RESTRICT __declspec(restrict) # define GLM_RESTRICT_VAR __restrict # define GLM_CONSTEXPR +#elif(GLM_COMPILER & GLM_COMPILER_INTEL) +# define GLM_DEPRECATED +# define GLM_ALIGN(x) __declspec(align(x)) +# define GLM_ALIGNED_STRUCT(x) __declspec(align(x)) struct +# define GLM_RESTRICT +# define GLM_RESTRICT_VAR __restrict +# define GLM_CONSTEXPR #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))) diff --git a/readme.txt b/readme.txt index 5b48f4ca..b3fd8326 100644 --- a/readme.txt +++ b/readme.txt @@ -7,7 +7,7 @@ glm@g-truc.net ================================================================================ The MIT License -------------------------------------------------------------------------------- -Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +Copyright (c) 2005 - 2013 G-Truc Creation (www.g-truc.net) Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal @@ -36,6 +36,11 @@ GLM is a header only library, there is nothing to build, just include it. More informations in GLM manual: http://glm.g-truc.net/glm.pdf +================================================================================ +GLM 0.9.4.2: 2013-01-XX +-------------------------------------------------------------------------------- +- Fixed SIMD support for Intel compiler on Windows + ================================================================================ GLM 0.9.4.1: 2012-12-22 -------------------------------------------------------------------------------- From 68cf8d5fe5fc189eccde81681b4ff69fc8178d14 Mon Sep 17 00:00:00 2001 From: Christophe Riccio Date: Mon, 7 Jan 2013 23:50:21 +0000 Subject: [PATCH 6/6] Updated readme.txt --- readme.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/readme.txt b/readme.txt index b3fd8326..20be19a2 100644 --- a/readme.txt +++ b/readme.txt @@ -40,6 +40,9 @@ http://glm.g-truc.net/glm.pdf GLM 0.9.4.2: 2013-01-XX -------------------------------------------------------------------------------- - Fixed SIMD support for Intel compiler on Windows +- Fixed isnan and isinf for CUDA compiler +- Fixed GLM_FORCE_RADIANS on glm::perspective +- Fixed GCC warnings ================================================================================ GLM 0.9.4.1: 2012-12-22