title: Why does glLoadIdentity have to be called after every call to glMatrixMode?
body: <p>I am reading a book on OpenGL, SDL, and have read some of the OpenGL documentation. I have also read this post: <a href="https://stackoverflow.com/questions/628796/what-does-glloadidentity-do-in-opengl">What does glLoadIdentity() do in OpenGL?</a></p>
  
  <p>I am grasping what glLoadIdentity() does, and why it is used in a general sense (to return the current matrix back to its original state). What I do not know is why I am returning it to its original state. For instance:</p>
  
  <pre><code>glMatrixMode(GL_PROJECTION);
  glLoadIdentity();
  
  glOrtho(0.0f, 640, 480, 0.0f, -1.0f, 1.0f);
  
  glMatrixMode(GL_MODELVIEW);
  glLoadIdentity();
  </code></pre>
  
  <p>I am not exactly sure why glLoadIdentity() has to be called after each call to glMatrixMode. </p>