From 867db84ca5e029a93fd539a039622e92396bce80 Mon Sep 17 00:00:00 2001 From: Kristian Lein-Mathisen Date: Sun, 14 Apr 2013 23:30:30 +0200 Subject: [PATCH] Fixed mat2x4 value-type constructor #include #include using namespace std; int main() { // creating two should-be identical matrices glm::mat2x4 A((int)1); glm::mat2x4 B((float)1); float* Aptr = (float*)&A; float* Bptr = (float*)&B; for(int i = 0 ; i < 8 ; i++) cout << Aptr[i] << " "; cout << endl; for(int i = 0 ; i < 8 ; i++) cout << Bptr[i] << " "; } output before patch: 1 0 0 0 0 1 0 0 1 0 0 0 0 0 0 0 output after patch: 1 0 0 0 0 1 0 0 1 0 0 0 0 1 0 0 --- glm/core/type_mat2x4.inl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/glm/core/type_mat2x4.inl b/glm/core/type_mat2x4.inl index a78d5d0a..d324b580 100644 --- a/glm/core/type_mat2x4.inl +++ b/glm/core/type_mat2x4.inl @@ -109,7 +109,7 @@ namespace detail { value_type const Zero(0); this->value[0] = col_type(s, Zero, Zero, Zero); - this->value[1] = col_type(Zero, Zero, Zero, Zero); + this->value[1] = col_type(Zero, s, Zero, Zero); } template