PDA

View Full Version : Don't laugh!



dexity
11-30-2005, 10:54 AM
I am just starting in OpenGL and trying to figure out how it works. I need just to draw a line in C++ (I use free version Dev-C++). How can I do that in OpenGL? Do I need GLUT, GLU or GLX? Please help me :confused:

songho
11-30-2005, 11:35 AM
dexity,
Dev-C++ provides a project template for OpenGL application.

Goto File > New > Project...

Then, select "multimedia" tab from "New Project" popup window.

You will see OpenGL template. Click the OpenGL icon and type the name of your project then click ok.

Dev-C++ also provides sample codes within the project to draw a triangle and rotate it.
==song==

dexity
11-30-2005, 12:32 PM
Thanks, song! I appreciate it. I have found just one template (actually, program), that runs rotating triangle. But I still don't know is there any function in GL that draws just a line?

Aeluned
11-30-2005, 12:50 PM
glBegin(GL_LINES);
glVertexxx();
glVertexxx();
glEnd();

dexity
11-30-2005, 01:22 PM
Thank you very much :)