title: OpenGl : Rotate line about endpoint
body: <p>I'm new to OpenGL , and trying out some experimental code. I'm using Open GL 4+ . I was able to draw a line using this :</p>
  
  <pre><code>    glBegin(GL_LINES);
      glVertex3f(0.0,0.0,0.0);
      glVertex3f(1.0,1.0,0.0);
      glEnd();
  </code></pre>
  
  <p>Now I want to rotate this line about one of it's endpoints, like the hand of a clock. How do I go about doing this? I've searched online, but there's nothing that actually demonstrates simple line rotation. I tried using <code>glRotatef</code> but I think I'm missing out on some key thing, because the <code>glRotatef</code> had no effect on the line drawn. All tutorials seem to start with Triangles (not points and lines)</p>
  
  <p>What is the OpenGL workflow for doing these things? I keep coming across sample code where matrices are being used, but I don't exactly get the purpose.. I mean, do I have to explicitly keep track of my latest matrices, or is abstracted away by OpenGL and internally taken care of?</p>
  
  <p>I understand the math and the role of transformation matrices, but I'm getting confused about the matrices' role in writing OpenGL code. If there are functions like <code>glRotatef</code> , why explicitly specify matrices? </p>
  
  <p>It'd be really helpful to have some resources that explain everything from the very basic - points, lines <em>then</em> polygons etc</p>