glLineWidth guarantees to support only width 1. On Windows, it's limited to width 10. To overcome this limitation, the common suggestion is to "simply" render a rectangle instead.
Since this seems like a basic requirement (render 2D/3D lines of arbitrary width, mesh wireframe, etc.), I was wondering if anyone has a code snippet for it.
It would work similar to what the legacy OpenGL offers. Input: two 3D points and width. Output: It would render a 3D line that faces the camera with width in pixels.
Emphasis:
- It needs to face the camera.
- The width is in screen pixels.
Since it's a 3D (flat) line, these properties aren't defined properly. So, I guess it would be something like "as much as possible" and "on average" (whatever that means). This is probably why glLineWidth is limited.