title: Is glm::ortho() actually wrong?
body: <p>I recently thought it would be a good idea to switch from the old (deprecated) functionality that OpenGL provides, such as matrix operations and the fixed function pipeline.</p>
  
  <p>I am using GLM as my matrix library to simplify things a bit. The problem is that it may have caused more problems than it simplified...</p>
  
  <p>Perspective projections worked fine with my shaders and setup, but when I tried to switch to orthogonal, everything broke down. My points and simple quads wouldn't display. When I used the old OpenGL matrices, things started working again.</p>
  
  <p>I narrowed it all down to the projection matrix. Here is how I called it:</p>
  
  <pre><code>glm::mat4 projMat = glm::ortho( 0, 400, 0, 400, -1, 1 );
  </code></pre>
  
  <p>I compared that to the one supplied by opengl once this is called"</p>
  
  <pre><code>glOrtho( 0, 400, 0, 400, -1, 1 );
  </code></pre>
  
  <p>The only differences are the [0][0] element and [1][1] element (which, as far as I know, be equal to "2/width" and "2/height", respectively). From the OpenGL matrix, the values were exactly that! On the glm matrix, though, the values were 0.</p>
  
  <p>Once I manually switched the values from the glm matrix after I called glm::ortho, everything was working again!</p>
  
  <p>So my question: is the glm::ortho() function really broken, or am I just using it wrong?</p>