Results 1 to 7 of 7

Thread: Drawing lines on top

  1. #1
    Junior Member Newbie
    Join Date
    Jan 2001
    Location
    Fort Collins, CO, USA
    Posts
    4

    Drawing lines on top

    I'm working on an app that draws many polys and lines. I want certain lines to draw on top of everything else. How do I do this? Right now I have

    glBegin(GL_LINE_LOOP);
    glVertex3d(v1x, v1y, v1z);
    glVertex3d(v2x, v2y, v2z);
    glVertex3d(v3x, v3y, v3z);
    glVertex3d(v4x, v4y, v4z);
    glEnd();

    It's drawing the line underneath everything.

    Thanks for your help.

    Stephanie
    Stephanie

  2. #2
    Senior Member OpenGL Pro
    Join Date
    Dec 2007
    Posts
    1,077

    Re: Drawing lines on top

    If you disable depth testing (glDisable(GL_DEPTH_TEST)), any new line will be drawn over the old ones. That however disables the z-test, so also object that you would like not to see might be drawn then.

  3. #3
    Senior Member OpenGL Pro
    Join Date
    Jun 2000
    Location
    Shreveport, LA, USA
    Posts
    1,502

    Re: Drawing lines on top

    I think you might find glPolygonOffset to be of use.

  4. #4
    Senior Member OpenGL Pro
    Join Date
    Dec 2007
    Posts
    1,077

    Re: Drawing lines on top

    Yeah, DFrey, you're always falling in my back with your idiotic answers. Geez. Well, just cleaned my room (or how'd you say?). Gives a great flair and feeling. You should clean your room as well! Well, I'm a bit unclean in the other time...

  5. #5
    Senior Member OpenGL Pro
    Join Date
    Dec 2007
    Posts
    1,077

    Re: Drawing lines on top

    Oh, say, Stephanie, what's your age?

  6. #6
    Junior Member Newbie
    Join Date
    Jan 2001
    Location
    Fort Collins, CO, USA
    Posts
    4

    Re: Drawing lines on top

    Thanks to everyone for all the help. I think I have it.

    Just out of curiosity, why is my age relevant?

    Stephanie
    Stephanie

  7. #7
    Senior Member OpenGL Pro
    Join Date
    Dec 2007
    Posts
    1,077

    Re: Drawing lines on top

    Well, your name appeared to be feminine...

Similar Threads

  1. Replies: 3
    Last Post: 06-15-2015, 03:48 AM
  2. Simply drawing lines; Adjusting drawing to window
    By Zaemz in forum OpenGL: Basic Coding
    Replies: 1
    Last Post: 04-12-2012, 03:56 AM
  3. Drawing Help lines
    By BertusDries in forum OpenGL: Basic Coding
    Replies: 2
    Last Post: 02-21-2012, 02:35 AM
  4. drawing lines anyone????
    By cali in forum OpenGL: Basic Coding
    Replies: 1
    Last Post: 10-03-2001, 12:52 AM
  5. drawing fat lines
    By ann in forum OpenGL: Basic Coding
    Replies: 3
    Last Post: 10-12-2000, 09:49 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