PDA

View Full Version : Outlined arc, circle



dlswimmer
07-14-2003, 09:15 AM
is there a way to make an outlined circle and or arc. The problem is that all my lines and other objects have defined line sizes which don't change as you zoom in. But with quadratics, it has an actual size, so when you zoom in, it gets bigger. is there another way to draw circles and arcs or is there a way to set the line size? Thanks for your help.

Relic
07-14-2003, 11:39 AM
is there a way to make an outlined circle and or arc.
Of course. Draw a linestrip with the vertices descibing the circle or arc.
Or draw a polygon with glPolygonMode set to GL_LINE.
The problem is that all my lines and other objects have defined line sizes which don't change as you zoom in. But with quadratics, it has an actual size, so when you zoom in, it gets bigger. is there another way to draw circles and arcs or is there a way to set the line size?

I recommend reading at least once through the OpenGL command reference at http://msdn.microsoft.com/library/default.asp?url=/library/en-us/opengl/apxb4_82lh.asp
before asking such questions.

glLineWidth can be used to set, uh, line width.
Note that an implementation is allowed to only support linewidth of 1.0.
You need to query the minimum and maximum line withs for aliased and antialiased lines, which may be different, and the granularity. Normally antialiased line width of 0.5 to 10.0 are supported. Some really highend boards only support 1.0 though.
A way to draw arbitrarily wide lines is to describe them with a triangle- or quadstrip along the line's path. A little more complicated but would allow you to zoom in infinitely. (No, I don't have that as code.)