title: OpenGL transform matrix order is backwards
body: <p>If I want to rotate the object around z axis, and then translate it I must do</p>
  
  <pre><code>glm::mat4 transform;
  GLfloat angle = 90f;
  transform = glm::rotate(transform, angle, glm::vec3(0.0f, 0.0f, 1.0f));
  transform = glm::translate(transform, glm::vec3(0.5f, -0.5f, 0.0f));
  </code></pre>
  
  <p>But it works backwards, it first rotates and then translates, so I need to write it as</p>
  
  <pre><code>glm::mat4 transform;
  GLfloat angle = 90f;
  transform = glm::translate(transform, glm::vec3(0.5f, -0.5f, 0.0f));
  transform = glm::rotate(transform, angle, glm::vec3(0.0f, 0.0f, 1.0f));
  </code></pre>
  
  <p>How do the maths behind this work? Why I must combine matrixes in reverse to achieve the desired effect?</p>