Fixed mat2x4 value-type constructor

#include <glm/glm.hpp>
#include <iostream>
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
This commit is contained in:
Kristian Lein-Mathisen 2013-04-14 23:30:30 +02:00
parent 78d3e5ca66
commit 867db84ca5

View File

@ -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 <typename T>