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; }