I need to draw thousands of 3D lines per second for an industrial WPF app but WPF appears to have no native HW-accelerated line feature.
By "3D" I mean they can be rotated in 3 axes, shown in perspective, etc. By "lines" I mean just that - these are not a wireframe of a 3D object so I do not want a tesselation of a 3D surface and I do not want these lit or shaded.
Variations of this question have been asked on StackOverflow before. People have suggested:
- XNA, but XNA is deprecated
- Helix3D but its lines have weird, unacceptable rendering artifacts
- OpenGL (e.g., OpenTK or SharpGL), but I've had lots of discussions with people on the OpenGL forums and all the OpenGL interfaces with WPF seem to have major issues interfacing with other WPF features and require hacks to work around.
I think my best bet is using DirectX or Direct3D. But I don't know how to integrate them with WPF. Also Direct3D also has no native line primitive (it uses textured triangles) see: https://msdn.microsoft.com/en-us/library/windows/desktop/bb323719%28v=vs.85%29.aspx
If necessary I'm willing to do 2D hardware accelerated lines and do my own 3D-2D mapping.
But the main thing is that this has to integrate smoothly with WPF so I can overlay the graphics with a transparent WPF Canvas on which I can draw markers, text, ROI's etc.
How do I do this?