This topic is now archived and is closed to further replies.


Line Primitives

Recommended Posts

Is there a way to adjust the width of these lines?

Not currently...

And if there is, is it possible to make their width dependant on their distance from the camera?

When you can, they won't be by default. The problem is the start and end points may be at different distances from the camera, so the line should get thinner as you move along it. When you can do this, it's extremely likely that you'll simply set a width for the whole line.

If you want the line to change size along it's length, then a much better plan would be to implement the line yourself as a quad.

Check out "Texture Mapping as a Fundamental Drawing Primitive" for the general idea (the Anti-aliased line segments bit), references and some interesting extensions of the idea:

IIRC you'll also find some working D3D code over at

Simon O'Connor
Creative Asylum Ltd

[edited by - S1CA on August 12, 2002 2:51:51 PM]

Share this post

Link to post
Share on other sites