I would like to draw a large number of quads, each representing a small segment of a curve, so that the curve appears smooth but is really made up of just linear pieces. I also want to be able to set both the thickness of the line and a thickness for a blended part of the line, such that in the blended region the line linearly loses its alpha component. Ideally these lines would be able to be oriented in any way in a 3D scene, though they will most often be in a plane facing the camera.
The problem is that it is that it's hard to blend the line with the background without having the overlapping segments interact with each other, becoming brighter where many overlap. I only want 1 fragment of the line to blend with the background, but it's hard to know which fragment is the correct one if you render each quad separately.
Is there an efficient way to do something like this? Or do I have to do some kind of pre-processing to turn the line into 1 mesh instead of rendering it as a bunch of quads?
[Here is a picture of the problem with the lines intersecting each other & not blending correctly]
http://i.imgur.com/8cYm1zK.png
Here is a related problem, but it's different because I want to blend the quads so that they fall off linearly. If you implement the solution from this thread, then the blending will look incorrect.
OpenGL blending function to elminate primitive overlap but maintain overall opacity