thick mitered lines?

Sage
Posts: 1,234
Joined: 2002.10
Post: #1
GL_LINES isn't doing it for me. I need thick antialiased lines, which work fine on my Radeon but not on GF4MX. I also want mitered joins.

So, the GL FAQ says:

"Another solution is for the application to handle the capping and mitering. Instead of rendering lines, the application needs to render face-on polygons. The application will need to perform the necessary math to calculate the vertex locations to provide the desired capping and joining styles."

Sounds like I need to calculate the vector perpendicular to each line join, offset from the line center, and draw a tristrip.

This seems like it ought to be a well-solved problem, so can anyone point me towards code?
Quote this message in a reply
Zoldar256
Unregistered
 
Post: #2
Assuming you've drawn your quads to represent the body of the line. I figure you'd have two lines that share one point on their quads. So you could just use a triangle fan with the shared point as the center. Then just do a simple parameterized circle calculation to get the curve to connect the two points that are not shared.

Vague, but I hope this points you in the right direction.
Quote this message in a reply
Post Reply 

Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  n00b question: getting rid of lines along edges of polygons Andrew 2 2,798 Jun 5, 2005 05:57 PM
Last Post: Andrew
  Blending -> Black Lines Through Textures (Wireframe like) hangt5 2 3,314 Apr 5, 2005 05:06 AM
Last Post: ThemsAllTook
  Weird lines on my display? AngelDaniel 1 2,308 Mar 12, 2005 08:55 AM
Last Post: AngelDaniel
  textures vs lines and polygons reubert 16 6,903 Jul 9, 2003 05:20 PM
Last Post: henryj
  lines in 3d files w_reade 7 3,886 Dec 9, 2002 01:45 PM
Last Post: OneSadCookie