EDIT, got it work people, apparently you have to call glEnable (GL_LINE_SMOOTH) for some reason.
Thanks no one it's working now.....hey people I am also having problems with this.......it won't smooth out the lines.
Code:
glPolygonMode(GL_BACK, GL_LINE);
glBegin(GL_TRIANGLES);
glEnable(GL_POLYGON_SMOOTH);
glVertex3f(-1.0f, -1.0f, -5.1f);
glVertex3f( 0.0f, 1.0f, -5.1f);
glVertex3f( 1.0f, -1.0f, -5.1f);
glEnd();
The book says something about lines of with (1.0) but I don't really understand what it's refering to.