0

Best way to draw a line

Anonymous 10 years ago 0
This discussion was imported from CodePlex

baucez wrote at 2012-04-30 16:38:

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

PipeVisual3D
LinesVisual3D
Something else.. 


objo wrote at 2012-04-30 17:26:

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.


baucez wrote at 2012-04-30 17:50:

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.