

In 3D a set of triangles looks like a ribbon, i.e., it may look like a solid line under certain view, but the line look is lost when the view point is changed.In this case we have to deal with two problems: It is possible to draw those geometries by using GL_TRIANGLE_STRIP. Adjacent triangles (or quads) are drawn without any gaps between them. One of the ways to solve the problem is to represent each line segment as a set of triangles. The default OpenGL drawing of line strip geometry does not allow to render smooth (non-broken) lines, as well as to render them of customary thicker than default width: For example, when I was doing tests on my machine, I could not overcome the thickness of 10.f. Possibility to draw lines thicker than allowed default thickness.Think of a CAD application and how the lines have the same thickness no matter of their location of viewpoint. The lines have a 2D look which means the width of lines does not depend on the distance from the camera view.There is no visible border between the adjacent lines in polyline, which occurs when we use the default OpenGL geometry mode such as GL_LINE_STRIP_ADJACENCY.To summarize the goal, we want to be able to draw lines in 3D that satisfy the next conditions: This tutorial is more expanded version of an answer on my stackoverflow question.
LAYOUTEDITOR THICKER LINES HOW TO
How to draw thick and smooth 3D lines in OpenSceneGraph / OpenGL
