How do I change the thickness of lines when drawing line lists using Direct3D?
This post says that line width is not supported and goes on to provide a workaround. O
Line thickness is not only not supported by Direct3D, but neither is it supported by any currently existing GPU. There is no GPU that I am aware of that can even draw proper lines at all (they all fake lines by using degenerate polygons - that is, the second and third vertices are at the same position, so the triangle essentially collapses to a single line).
While it is possible to set a line width in OpenGL, the OpenGL driver creates extruded quads (which are not supported by and current GPU either, and emulated using two triangles for each quad) to draw the "lines" on the screen.
So there's probably no way around creating extruded quads for that purpose. There are several ways to achieve that, as Stringer Bell explained in his answer.
The easiest way that works for me is to create a vertex buffer that contains each vertex twice, with normals pointing "right" or "left", depending on whether they are the right or left edge of the line. Then a very simple vertex shader can perform the extrusion (by changing the vertex position by a multiple of its normal vector). This way you can quickly change the line width, without having to recalculate your geometry on the CPU. This can be useful if you want to adjust the line width depending on the object's size or distance.