Results 1 to 6 of 6

Thread: gluDisk shows broken line

  1. #1
    Junior Member Newbie
    Join Date
    Dec 2008
    Posts
    4

    gluDisk shows broken line

    I am trying to draw a 'rope' on the boundary of a field and have used gluDisk with a outer radius of 30 and an inner radius of 29.95. The circle is drawn in segments but is not a continuous circle and appears as a broken circle with various segments missing. To get a continuous circle by reducing the inner radius, the thickness has to become unrealistic before the circle is fully joined up.

    Appreciate any thoughts on solving this - maybe I have to model my own rope section and draw a circle from these.

  2. #2
    Junior Member Newbie
    Join Date
    Dec 2008
    Posts
    4

    Re: gluDisk shows broken line

    BTW, The key line of code I'm using is...
    gluDisk( gRopeLine, 29.95, 30.00, 64, 4 );

  3. #3
    Senior Member OpenGL Pro dletozeun's Avatar
    Join Date
    Jan 2006
    Location
    FRANCE
    Posts
    1,367

    Re: gluDisk shows broken line

    A screenshot may be helpful, I can not visualize what your problem is.
    Is face culling enabled? If it is, try to disable it.

  4. #4
    Junior Member Newbie
    Join Date
    Dec 2008
    Posts
    4

    Re: gluDisk shows broken line

    Thanks for your suggestion. I disabled the face culling but can see no difference. Screen shot of the broken line is attached. All help is very much appreciated.



  5. #5
    Super Moderator OpenGL Lord
    Join Date
    Dec 2003
    Location
    Grenoble - France
    Posts
    5,574

    Re: gluDisk shows broken line

    This is normal, as the width of your rope is less than one pixel (I would say half a pixel).
    You will have to draw it as GL_LINE to guarantee at least one pixel wide line is visible.
    You can also try a multisampled framebuffer, or glEnable(GL_POLYGON_SMOOTH); but that can become tricky.

  6. #6
    Junior Member Newbie
    Join Date
    Dec 2008
    Posts
    4

    Re: gluDisk shows broken line

    I have now replaced the gluDisk with a GL_Line and this indeed works well. As an added bonus I can now get anti-aliasing working on the line so the result is now perfect!!

    Great support - thank you and Happy New Year.

Similar Threads

  1. gluDisk bug?
    By alexxi in forum OpenGL: Basic Coding
    Replies: 0
    Last Post: 07-14-2016, 08:39 PM
  2. Solid broken line with antialiasing
    By -=MadMan=- in forum OpenGL: Basic Coding
    Replies: 2
    Last Post: 05-23-2005, 01:08 AM
  3. Question about gluDisk
    By anuchka in forum OpenGL: Basic Coding
    Replies: 2
    Last Post: 07-22-2004, 06:06 AM
  4. gludisk with circles
    By in forum OpenGL: Basic Coding
    Replies: 1
    Last Post: 02-29-2004, 08:12 AM
  5. problem with gluDisk
    By tim_ganly in forum OpenGL: Basic Coding
    Replies: 1
    Last Post: 02-07-2002, 04:30 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