PDA

View Full Version : beginner question about dots



earlygrey
03-16-2008, 05:13 AM
new to opengl and want to learn some basic things first.
i know how to draw dots, but how do i draw lines from one point to another?

RGHP
03-16-2008, 01:49 PM
that is very very simple. Instead of:

glBegin( GL_POINTS);
glVertex(...);//dot 1
glVertex(...);//dot 2
glEnd();

type:

glBegin( GL_LINES);
glVertex(...);//dot 1
glVertex(...);//dot 2
glEnd();


go to Nehe!


http://nehe.gamedev.net/