title: GlOrtho not working properly
body: <p>I am using GLUT and for some reason my glOrtho isn't working properly.</p>
  
  <p>This is my code:</p>
  
  <pre><code>#include"Dependencies\glew\glew.h"
  #include"Dependencies\freeglut\freeglut.h"
  #include&lt;iostream&gt;
  void render(void)
  {
      glEnable(GL_DEPTH_TEST);
      glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
      glClearColor(1, 1, 1, 1.0);
      glMatrixMode(GL_PROJECTION);
      glLoadIdentity();
      glOrtho(0, 1280, 720, 0, 0, 1);
      glLoadIdentity();
      glMatrixMode(GL_MODELVIEW);
      glLoadIdentity();
      float x = 0.0;
      float y = 0;
      glBegin(GL_QUADS);
          glColor3f(1, 0, 0);
          glVertex2f(x, y);
          glVertex2f(x + .1, y);
          glVertex2f(x + .1, y + .1);
          glVertex2f(x, y + .1);
      glEnd();
      glutSwapBuffers();
  }
  void closeCallback()
  {
  
      std::cout &lt;&lt; "GLUT:\t Finished" &lt;&lt; std::endl;
      glutLeaveMainLoop();
  }
  
  int main(int argc, char **argv)
  {
  
      glutInit(&amp;argc, argv);
      glutInitDisplayMode(GLUT_DEPTH | GLUT_DOUBLE | GLUT_RGBA);
      glutInitWindowPosition(32, 32);
      glutInitWindowSize(1280, 720);
      glutCreateWindow("MahGame");
      glutSetOption(GLUT_ACTION_ON_WINDOW_CLOSE, GLUT_ACTION_GLUTMAINLOOP_RETURNS);
  
      glewInit();
  
      glutDisplayFunc(render);
      glutCloseFunc(closeCallback);
  
      glutMainLoop();
  
      return 0;
  }
  </code></pre>
  
  <p>Even though I set my x and y floats to 0 I renders it in the middle, and when I try something like x + 50, it is SUPER huge, I have to make it x + 0.5f so that my triangle is small.</p>