how to draw a line ?

Hi ,

please i want to ask , how can i draw a line in openGL?

i have a project to submit in these days but i dont know how to draw the picture that i chosed…its a horse and when i apply the function LINE_Stripple

its not look good .

:frowning:

The general syntax is:

glBegin(GL_LINES) or (GL_LINE_STRIP) or (GL_LINE_LOOP);
glVertex2f(x, y) or glVertex3f(x, y,z);
...
glEnd();

You can look for what best suits your needs here (look at the images :wink: ). If you still have problems then, maybe you can make some picture of how your problem looks like.

Thank you Brokenmind , i already know this structure … hmmmmm i mean if i want to draw a horse but make it natural not just lines .

this is my picture [ATTACH=CONFIG]612[/ATTACH]

i hope u understand what im trying to say .

Do you simply want to draw your horse no matter what (as a picture), or do you explicitly want to convert it into lines and draw them afterwards? I’m afraid the latter is no easy task and I have no idea how to do it. The former can be achieved with the use of textures, as shown here.

Thank u brokenmind :slight_smile: