Today I was confronted with the problem that my unfilled circles, rendered with the function from my previous posting did look good only as long as I did not set the glLinewidth higher than 1. When using fat lines, the result looked bizarre - that is, it was missing some parts. When additionally using GL_LINE_SMOOTH the result was perfectly round but had a moiree pattern inside the fat line.
The solution was rather simple, just dont mess with glLinewidth and leave it at 1.0.
But then again, I still wanted to draw a circle with a thick outline.
Once again the solution was surprisingly simple. Instead of using a GL_LINE_LOOP, I used a GL_TRIANGLE_STRIP with the first point calced on the outer side of the circle (radius+lineWidth/2) and the second point on the inner side of the circle (radius-lineWidth/2). Et voila, a perfectly round circle drawn with a fat line.
Only downside is, I lost the smoothing that way. That I will have to implement now as well us...
more