title: Rotating a 2D object drawn with OpenGL
body: <p>I made a fancy shape with OpenGL and I draw that shape this function:</p>
  
  <pre><code>drawShape(const Point &amp; center, char radius, int points, int rotation)
  </code></pre>
  
  <p>Inside the function I have code that tells OpenGL where the vertexes are:</p>
  
  <pre><code>glBegin(GL_LINE_LOOP);
    glColor3f(1.0, 1.0, 1.0);
    glVertex2f(center.getX() + 0.0, center.getY() + 1.0);
    // more vertices
  glEnd();
  </code></pre>
  
  <p>Now when I add <code>glRotatef(rotation, 0.0, 0.0, 1.0)</code>, I would like just this shape that I have drawn to rotate on the screen.  However, if I add it above <code>glBegin()</code> it rotates everything in the window. If I include all the code between <code>glPushMatrix()</code> and <code>glPopMatrix()</code> rotates the object, but around the center of the window. How can I rotate just the object that I have drawn?</p>