title: OpenGL rotation and translation done correctly
body: <p>Im a bit stuck when it comes to rotation and translation in OpenGL.</p>
  
  <p>I got 3 Matrices, projection, view and model. </p>
  
  <p>My VertexShader:</p>
  
  <pre><code>gl_Position =  projection * model * view * vec4(vertexData, 1);
  </code></pre>
  
  <p>What is the best way to translate and rotate objects?</p>
  
  <p>Either multiply my model matrix with a translation and or rotation matrix, 
  or pass data (rotation and translation) to the shader and to the math there?</p>
  
  <p>Also I need to know "the final object position" for my mousepicking implementation.</p>
  
  <p>What I did so far was something like this:</p>
  
  <pre><code>object.Transformation = Matrix.CreateTransLation(x,y,z) * Matrix.CreateRotation(x,y,z);
  </code></pre>
  
  <p>...</p>
  
  <pre><code>ForEach object to Draw
  {
      modelMatrix.Push();
  
      modelMatrix.Mult(object.Transformation); // this also updates the matrix for the shader
  
      object.Draw();
  
      modelMatrix.Pop();
  }
  </code></pre>
  
  <p>This works, but it doesnt feel right. What the best way to do this?</p>