Wednesday, 27 April 2011

OpenGL Primitives

Drawing two lines
glBegin(GL_LINES);
    glVertex3f(_,_,_); // start point of line 1
    glVertex3f(_,_,_); // end point of line 1
    glVertex3f(_,_,_); // start point of line 2
    glVertex3f(_,_,_); // end point of line 2
glEnd();
We can replace GL_LINES with GL_POINTS, GL_LINELOOP, GL_POLYGON etc.

No comments:

Post a Comment