title: Not updating coordinate positions?
body: <p>I have managed to rotate a rectangle in OpenGL (C++) just fine. I am making a program that tests two rectangles for collision using the "separated axis theorem". To use the theorem, I need the x and y coordinates of each corner of the rectangle, but my problem is that, although I call <code>glRotatef(...)</code>, the coordinates of the corners of the rectangle are not changed to the values that they are rotated too, but the rectangle rotates as it should. How can I update the coordinates of my rectangle after glRotatef is called?</p>
  
  <p>Code:</p>
  
  <pre><code>// float r1.x[4] and r1.y[4] hold the x and y position of each of the 4 corners, starting with the upper left (r1.x[0], r1.y[0])
      glLoadIdentity();
      glTranslatef((r1.x[0] + r1.x[2]) / 2, (r1.y[1] + r1.y[3]) / 2, 0); // Translates matrix to center of rectangle
      glRotatef(r1.angle, 0, 0, 1);
      glTranslatef(-((r1.x[0] + r1.x[2]) / 2), -((r1.y[1] + r1.y[3]) / 2), 0); // Translates back
      r1.angle++;
  
      glBegin(GL_QUADS);
          glVertex2f(r1.x[0], r1.y[0]);
          glVertex2f(r1.x[1], r1.y[1]);
          glVertex2f(r1.x[2], r1.y[2]);
          glVertex2f(r1.x[3], r1.y[3]);
      glEnd();
  </code></pre>