0

I want to create a line at (0,0)(1,0), then create (0,0)(2,0), then 3, 4,... up to 10, then again back (9,0)....(1,0). Is there any way how to do this?

void DrawLine(int a) {

    glBegin(GL_LINES);{
        glVertex3f(a,0,0);
        glVertex3f(0,0,0);

        glVertex3f(0,a,0);
        glVertex3f(0,0,0);

        glVertex3f(-a,0,0);
        glVertex3f(0,0,0);

        glVertex3f(0,-a,0);
        glVertex3f(0,0,0);

    }glEnd();
}
Nicol Bolas
  • 449,505
  • 63
  • 781
  • 982
mahbub
  • 1
  • 1

0 Answers0