0

This is a screen shot of a project that I did a few years ago: enter image description here

I did this with XNA. I've done similar things with the Sunburn Engine and OpenGL. There are really only two files: a large bitmap topographical map and a similar size height map 'underneath'.

I'm wondering how I would do this in a WPF program. Ideally, I would be able to rotate this in 3D in a window. The only thing I've seen similar seems to use 3rd party plug-ins.

Can anybody steer me in the right direction?

Thanks!

zetar
  • 1,225
  • 2
  • 20
  • 45
  • 1
    This question will probably get flagged for being too broad but there are plenty of [WPF 3D tutorials](http://www.wpftutorial.net/introductionto3d.html) to get you started. Be aware though that you'll be limited to a fixed-function pipeline, if you want custom shaders then you'll need to use a different technology. I personally use XNA for 3D scenes with WPF overlayed on top for the GUI. – Mark Feldman Apr 12 '16 at 21:41
  • As I said, I've done this before in XNA. How do you create a WPF program that utilizes XNA 3d? – zetar Apr 12 '16 at 23:11

1 Answers1

0

Sorry but your question wasn't worded very clearly, it sounded like you wanted to port from XNA to WPF 3D graphics.

Displaying XNA in a WPF app is fairly straightforward and is explained on Nick Gravelyn's MSDN article. Sample code is also provided, so that should be enough to get you started.

The main problem with Nick's technique is that it doesn't allow you to overlap XNA and WPF elements in the same window. You can get around that by placing the WPF controls inside a Popup as described in Fredrik Hedblad's answer to this SO question.

Combine the two together and you get a WPF front end overlaying an XNA-rendered scene.

Community
  • 1
  • 1
Mark Feldman
  • 15,731
  • 3
  • 31
  • 58