I am new to OpenGL. Can you tell me a simple program that can draw a line between two points. I am using vc++.
Did you try the beginner tutorials of opengl ?
Because in those tutorials, there are many many programs to show you how to create a opengl context (linux or window) and some application (with source code) from very easy ones to more complicated others.
Thank you very much for your information.
after you set up your basic window etc use this to draw the actual line
glColor3f(1.0, 0.0, 0.0);
glVertex3f(0.0, 0.0, 0.0);
glVertex3f(15, 0, 0);
Thanks Gavin. Above code works.
Have a look at NeHe’s marvellous Site with a lot of OpenGl-Tutorials:
Thanks. This site is very much useful.