Thick lines with glLineWidth()

Hi All,

Is there a way to change the ‘cutter blade like’ shape of oblique thick lines? I mean the beginning and the end of the line.



You’ll have to use antialiasing, according to the GLspec:

Non-antialiased line segments of width other than one are rasterized by offsetting them in the minor direction (for an x-major line, the minor direction is y, and for a y-major line, the minor direction is x) and replicating fragments in the minor direction

Rasterized antialiased line segments produce fragments whose fragment squares intersect a rectangle centered on the line segment. Two of the edges are parallel to the specified line segment; each is at a distance of one-half the current width from
that segment: one above the segment and one below it. The other two edges pass through the line endpoints and are perpendicular to the direction of the specified line segment.


Well, it can depend a lot of your hardware.

These tests have been done on a mac, but I guess it depends more on the card than on the OS :

Thanks a lot guys. Now it is more clear to me. Very interesting also the FSAA link.