The basic method for drawing a shape is:
glBegin(...) glVertex(...) glVertex(...) glVertex(...) ... glEnd()
Always be sure to have a matching glEnd() for each glBegin()