tags:

views:

129

answers:

2

I'm using OpenGL and was told I should draw circles at each vertex of my outline to get smoothness. I tried this and it works great. The problem is speed. It crippled my application to draw a circle at each vertex. I'm not sure how else to fix the anomaly of my outlines other than circles, but using display lists and trying with vertex array both were brutally slow. Thanks

see: http://stackoverflow.com/questions/3039026/edges-on-polygon-outlines-not-always-correct

A: 

Have you seen this article?

..or if you have access to the GL utility library, you could use gluDisk

Jon Cage
Yes I have, I tried this with both DLs and Vertex Arrays
Milo
Are GLUDisks super efficient?
Milo
I'm not sure - it's been a long time since I played with OGL. Why not try it? :-)
Jon Cage
gluQuadrics is based on immediate mode, i.e glBegin/glEnd. Avoid at all costs.
Mads Elvheim
A: 

One (perhaps too fancy) alternative is to draw a single polygon that bounds the circle (say, a quad), and then use a fragment program to discard the fragments. This would not be entirely trivial to write, but I would bet it's the fastest way.

You would simply pass the circle parameters to the fragment program and discard the fragment if the distance from the fragment center to the center of the circle is bigger than the desired radius.

Carlos Scheidegger