Results 1 to 6 of 6

Thread: how to draw a line ?

  1. #1
    Junior Member Newbie
    Join Date
    Apr 2014
    Posts
    4

    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 .


  2. #2
    Member Contributor Brokenmind's Avatar
    Join Date
    Feb 2014
    Location
    Aachen / Germany
    Posts
    78
    The general syntax is:
    Code :
    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 ). If you still have problems then, maybe you can make some picture of how your problem looks like.

  3. #3
    Junior Member Newbie
    Join Date
    Apr 2014
    Posts
    4
    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 images3.jpg

  4. #4
    Junior Member Newbie
    Join Date
    Apr 2014
    Posts
    4
    i hope u understand what im trying to say .

  5. #5
    Member Contributor Brokenmind's Avatar
    Join Date
    Feb 2014
    Location
    Aachen / Germany
    Posts
    78
    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.

  6. #6
    Junior Member Newbie
    Join Date
    Apr 2014
    Posts
    4
    Thank u brokenmind

Similar Threads

  1. draw line, line-size ... opengl 3.3 ?
    By CarstenT in forum OpenGL: Basic Coding
    Replies: 2
    Last Post: 03-28-2014, 08:19 AM
  2. always draw a black line
    By kewuwsi in forum OpenGL: GLSL
    Replies: 5
    Last Post: 10-03-2007, 07:53 AM
  3. Draw Line
    By IG in forum OpenGL: Basic Coding
    Replies: 2
    Last Post: 01-18-2006, 07:57 AM
  4. about draw 2d line
    By Barbary in forum OpenGL: Advanced Coding
    Replies: 2
    Last Post: 03-01-2005, 11:10 PM
  5. how can I draw more than one line??
    By MOON-GIRL in forum OpenGL: Basic Coding
    Replies: 11
    Last Post: 12-04-2002, 06:07 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Proudly hosted by Digital Ocean