Fixed pick function... again

This commit is contained in:
Christophe Riccio 2011-03-11 02:15:15 +00:00
parent c6b7592246
commit b918e3ea3f
2 changed files with 3 additions and 1 deletions

View File

@ -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>(T(viewport[2]) / delta.x, T(viewport[3]) / delta.y, T(1)));
}
template <typename T>

View File

@ -15,5 +15,7 @@ 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;
}