title: Opengl 2D drawing not parallel to screen
body: <p>I think the 2D plane I draw on is not parallel to the screen.</p>
  
  <p>First, in my resize window function I put:</p>
  
  <pre><code>static void Resize(int w, int h)
  {
  width = w;
  height = h;
  
  glViewport(0, 0, width, height);
  
  glMatrixMode(GL_PROJECTION);
  glLoadIdentity();
  float32 ratio = width / height;
  
  b2Vec2 extents(ratio * 25.0f, 25.0f);
  extents *= viewZoom;
  
  b2Vec2 lower = settings.viewCenter - extents;
  b2Vec2 upper = settings.viewCenter + extents;
  gluOrtho2D(lower.x, upper.x, lower.y, upper.y);
  }
  </code></pre>
  
  <p>Here is how I initialize opengl.</p>
  
  <pre><code>glutInit(&amp;argc, argv);
  glutInitDisplayMode(GLUT_DOUBLE | GLUT_RGBA );
  glutInitWindowSize(width, height);
  mainWindow = glutCreateWindow("window");
  </code></pre>
  
  <p>And the drawscene function:</p>
  
  <pre><code>void drawScene() {
  
      glClear(GL_COLOR_BUFFER_BIT );
  
      glMatrixMode(GL_MODELVIEW);
      glLoadIdentity();
  
  
  
      glEnable(GL_BLEND);
      glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
      glEnable(GL_TEXTURE_2D);
      glBindTexture(GL_TEXTURE_2D, texture);
  
      glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
      glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
  
      glColor3f(1.0f, 1.0f, 1.0f);
  
      glBegin(GL_QUADS);
      glTexCoord2f(0.0f, 0.0f);
      glVertex2f(cords[0].x,cords[0].y);
      glTexCoord2f(1.0f, 0.0f);
      glVertex2f(cords[1].x,cords[1].y);
      glTexCoord2f(1.0f, 1.0f);
      glVertex2f(cords[2].x,cords[2].y);
      glTexCoord2f(0.0f, 1.0f);
      glVertex2f(cords[3].x,cords[3].y);
      glEnd();
  
      glDisable(GL_BLEND);
      glDisable(GL_TEXTURE_2D);
  
      glutSwapBuffers();
  }
  </code></pre>
  
  <p>I think the code is no problem because I've already loadIdentity for ModelView and Projection. The result of my drawing is that if my rectangle is parallel to the horizontal line, then it is a rectangle, when turned some angle, then it becames skewed. Seems the plane I'm drawing on is tilted backwards.</p>