From b918e3ea3f559499fe74647363457b5ac9899b90 Mon Sep 17 00:00:00 2001 From: Christophe Riccio Date: Fri, 11 Mar 2011 02:15:15 +0000 Subject: [PATCH] Fixed pick function... again --- glm/gtc/matrix_transform.inl | 2 +- test/gtc/gtc_matrix_transform.cpp | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/glm/gtc/matrix_transform.inl b/glm/gtc/matrix_transform.inl index 93d845e6..cdf546c2 100644 --- a/glm/gtc/matrix_transform.inl +++ b/glm/gtc/matrix_transform.inl @@ -359,7 +359,7 @@ namespace matrix_transform // Translate and scale the picked region to the entire window Result = translate(Result, Temp); - return scale(Result, T(viewport[2]) / delta.x, T(viewport[3]) / delta.y, T(1)); + return scale(Result, detail::tvec3(T(viewport[2]) / delta.x, T(viewport[3]) / delta.y, T(1))); } template diff --git a/test/gtc/gtc_matrix_transform.cpp b/test/gtc/gtc_matrix_transform.cpp index 0b9bc908..1ca84115 100644 --- a/test/gtc/gtc_matrix_transform.cpp +++ b/test/gtc/gtc_matrix_transform.cpp @@ -14,6 +14,8 @@ int main() { int Failed = 0; + + glm::mat4 Pick = glm::pickMatrix(glm::vec2(1, 2), glm::vec2(3, 4), glm::ivec4(0, 0, 320, 240)); return Failed; }