OpenGL doesn’t do joins or caps. A “polyline” rendered with GL_LINE_STRIP or GL_LINE_LOOP is no different to rendering the individual line segments separately.
If you want joins or caps, you’ll need to render them yourself.
[QUOTE=GClements;1292416]OpenGL doesn’t do joins or caps. A “polyline” rendered with GL_LINE_STRIP or GL_LINE_LOOP is no different to rendering the individual line segments separately.
If you want joins or caps, you’ll need to render them yourself.[/QUOTE]
Ok, I see.
So, I have to write my own geometry shader, right?
If you want GL_LINE_STRIP to do joins or caps, you’ll need a geometry shader which generates triangles. Alternative approaches include conversion to triangles in the application or drawing points at the vertices with a separate draw call.
I have used the method of drawing points at the vertices (suggested by GClements) to good effect.
You will want to use point and line smoothing for best results.
[QUOTE=Carmine;1292434]I have used the method of drawing points at the vertices (suggested by GClements) to good effect.
You will want to use point and line smoothing for best results.[/QUOTE]