Drawing smoothly connected lines with width

I am trying to draw lines that should be and look connected. The problem is that when the width is not 1.0, the edges don’t really look connected.
Is there a way to fix it without drawing the lines with triangles?

[ATTACH=CONFIG]598[/ATTACH]

[QUOTE=esapir;1258537]I am trying to draw lines that should be and look connected. The problem is that when the width is not 1.0, the edges don’t really look connected.
Is there a way to fix it without drawing the lines with triangles?[/QUOTE]

Put anti-aliased (i.e. round) points at the intersection of the lines. Use glEnable (GL_POINT_SMOOTH) to do this. Make the points the ~same width as the lines. This is very easy since you already have the coordinates of the beginning and end of each line segment. No calculations necessary. This will give you nicely rounded corners where your lines meet. Maybe that’s not what you want? It has worked well for me. Good luck.

Note Carmine’s technique does not work if you draw with alpha blending - then you have to pre-calculate the edge extrusions which gets ugly in 3D but not to bad in 2D