View Full Version : gluDisk shows broken line
12-24-2008, 02:50 AM
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.
12-24-2008, 02:59 AM
BTW, The key line of code I'm using is...
gluDisk( gRopeLine, 29.95, 30.00, 64, 4 );
12-24-2008, 04:08 AM
A screenshot may be helpful, I can not visualize what your problem is.
Is face culling enabled? If it is, try to disable it.
12-24-2008, 10:15 AM
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.
12-24-2008, 12:43 PM
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.
12-31-2008, 09:42 AM
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.
Powered by vBulletin® Version 4.2.2 Copyright © 2016 vBulletin Solutions, Inc. All rights reserved.