Best way to draw a line

Apr 30, 2012 at 2:38 PM

Which is the best way to draw a line (with highest performances)?

Something else.. 

Apr 30, 2012 at 3:26 PM

it depends on what you need:

LinesVisual3D is using two triangles per line segment. But it needs to update the vertices every time you change your camera. Remember this visual is working in 'screen space'.

PipeVisual3D is using more triangles per segment, but does not need to update the vertices (it is defined in 'model space').

The 'screen space' visuals can handle a few thousand points, but I think it gets too expensive with really high number of points. Then I think it is better to let the gpu handle more triangles in 'model space'. Does anyone know a better way to solve this? It's too bad WPF 3D does not support line primitives.

Apr 30, 2012 at 3:50 PM

Thanks objo,

your reply remember me that I already read something about this topic on Petzold blog but I don't remember it very much.
Probably you already read it too, however if it can be useful here is the post.