From b2f0f4d3f94da86e59206a1c72d44f984ba99d05 Mon Sep 17 00:00:00 2001 From: Christophe Riccio Date: Sat, 7 Apr 2012 00:36:15 +0100 Subject: [PATCH] Move noise, random and ulp test to GTC tests --- glm/gtx/noise.hpp | 5 ++++- glm/gtx/random.hpp | 3 +++ glm/gtx/ulp.hpp | 5 ++++- test/gtc/CMakeLists.txt | 1 + test/{gtx/gtx_ulp.cpp => gtc/gtc_ulp.cpp} | 0 test/gtx/CMakeLists.txt | 2 -- test/gtx/gtx_simd_mat4.cpp | 10 +++++----- 7 files changed, 17 insertions(+), 9 deletions(-) rename test/{gtx/gtx_ulp.cpp => gtc/gtc_ulp.cpp} (100%) diff --git a/glm/gtx/noise.hpp b/glm/gtx/noise.hpp index 6db21f82..f3d796cb 100644 --- a/glm/gtx/noise.hpp +++ b/glm/gtx/noise.hpp @@ -22,5 +22,8 @@ /////////////////////////////////////////////////////////////////////////////////// #if(defined(GLM_MESSAGES)) -# pragma message("GLM: GLM_GTX_random extension is deprecated, include GLM_GTC_random instead") +# pragma message("GLM: GLM_GTX_random extension is deprecated, include GLM_GTC_random (glm/gtc/noise.hpp) instead") #endif + +// Promoted: +#include "../gtc/noise.hpp" diff --git a/glm/gtx/random.hpp b/glm/gtx/random.hpp index 6db21f82..308b408a 100644 --- a/glm/gtx/random.hpp +++ b/glm/gtx/random.hpp @@ -24,3 +24,6 @@ #if(defined(GLM_MESSAGES)) # pragma message("GLM: GLM_GTX_random extension is deprecated, include GLM_GTC_random instead") #endif + +// Promoted: +#include "../gtc/random.hpp" diff --git a/glm/gtx/ulp.hpp b/glm/gtx/ulp.hpp index c14e40b8..431d80e5 100644 --- a/glm/gtx/ulp.hpp +++ b/glm/gtx/ulp.hpp @@ -22,5 +22,8 @@ /////////////////////////////////////////////////////////////////////////////////// #if(defined(GLM_MESSAGES)) -# pragma message("GLM: GLM_GTX_ulp extension is deprecated, include GLM_GTC_ulp instead") +# pragma message("GLM: GLM_GTX_ulp extension is deprecated, include GLM_GTC_ulp (glm/gtc/ulp.hpp) instead") #endif + +// Promoted: +#include "../gtc/ulp.hpp" diff --git a/test/gtc/CMakeLists.txt b/test/gtc/CMakeLists.txt index dbb92d83..bb29fe7a 100644 --- a/test/gtc/CMakeLists.txt +++ b/test/gtc/CMakeLists.txt @@ -9,3 +9,4 @@ glmCreateTestGTC(gtc_random) glmCreateTestGTC(gtc_swizzle) glmCreateTestGTC(gtc_type_precision) glmCreateTestGTC(gtc_type_ptr) +glmCreateTestGTC(gtc_ulp) diff --git a/test/gtx/gtx_ulp.cpp b/test/gtc/gtc_ulp.cpp similarity index 100% rename from test/gtx/gtx_ulp.cpp rename to test/gtc/gtc_ulp.cpp diff --git a/test/gtx/CMakeLists.txt b/test/gtx/CMakeLists.txt index 647beca9..63777e7b 100644 --- a/test/gtx/CMakeLists.txt +++ b/test/gtx/CMakeLists.txt @@ -4,11 +4,9 @@ glmCreateTestGTC(gtx_integer) glmCreateTestGTC(gtx_matrix_query) glmCreateTestGTC(gtx_noise) glmCreateTestGTC(gtx_quaternion) -glmCreateTestGTC(gtx_random) glmCreateTestGTC(gtx_rotate_vector) glmCreateTestGTC(gtx_simd_vec4) glmCreateTestGTC(gtx_simd_mat4) glmCreateTestGTC(gtx_string_cast) -glmCreateTestGTC(gtx_ulp) glmCreateTestGTC(gtx_vector_angle) glmCreateTestGTC(gtx_vector_query) diff --git a/test/gtx/gtx_simd_mat4.cpp b/test/gtx/gtx_simd_mat4.cpp index fbfa6af4..cdec4395 100644 --- a/test/gtx/gtx_simd_mat4.cpp +++ b/test/gtx/gtx_simd_mat4.cpp @@ -10,7 +10,7 @@ #include #include #include -#include +#include #include #include #include @@ -238,10 +238,10 @@ int main() std::vector Data(64 * 64 * 1); for(std::size_t i = 0; i < Data.size(); ++i) Data[i] = glm::mat4( - glm::vec4(glm::compRand4(-2.0f, 2.0f)), - glm::vec4(glm::compRand4(-2.0f, 2.0f)), - glm::vec4(glm::compRand4(-2.0f, 2.0f)), - glm::vec4(glm::compRand4(-2.0f, 2.0f))); + glm::vec4(glm::linearRand(glm::vec4(-2.0f), glm::vec4(2.0f))), + glm::vec4(glm::linearRand(glm::vec4(-2.0f), glm::vec4(2.0f))), + glm::vec4(glm::linearRand(glm::vec4(-2.0f), glm::vec4(2.0f))), + glm::vec4(glm::linearRand(glm::vec4(-2.0f), glm::vec4(2.0f)))); { std::vector TestInvA;