Managed Direct3D or XNA for non-game related 3D gr

2020-03-04 08:55发布

Which is the preferred approach for doing .NET 3D graphics programming: Direct3D or XNA seem to be the current technologies, but which is best for non-game related programming?

Also, has Managed Direct 3D been discontinued? XNA doesn't really seem to be appropriate for non-game development.

6条回答
Root(大扎)
2楼-- · 2020-03-04 09:08

Xna is Microsoft's Managed DirectX. Unfortunately they haven't written much about using it for non game related things but it can be done.

Unfortunately I can't find any good resources online that show how to do this right now.

查看更多
祖国的老花朵
3楼-- · 2020-03-04 09:17

Managed DirectX wasn't so much abandoned as it was rewritten as XNA. True, XNA was designed with the Xbox 360 in mind, but XNA is as appropriate to use for non-game 3D programming as is any other 3D framework I've used. Don't overlook XNA's enormously convenient content importing pipeline... You can get your models and shaders onto the card and rendering with great ease.

As stated above, the Creaters Club community is very rich, and their Winforms tutorials will likely be of interest to you.

查看更多
Bombasti
4楼-- · 2020-03-04 09:17

The simple answer here is maybe XNA. And maybe WPF. It depends.

If you're looking for anything that's remotely gamelike, XNA is a really good solution, as it gives you an framework that meshes very well with just about any implementation of a 3d interactive world. In addition to handling all of the 3d visual stuff, you get things like collision detection, lighting, timing, and cameras that all hook in very easily. If what you're working on is some kind of 3d virtual space, what you have is probably pretty close to being a game anyway and XNA will give you a lot more besides just the graphics end.

Otherwise, if you're looking for 3d UI or data visualization, WPF is probably more of what you want. There's less unnecessary overhead and the other things you get included like commanding or data binding are probably going to be more useful to you anyway. As I understand it, it's set to use hardware acceleration on the backend and will handle material shaders and various 3d effects through software if necessary so that the user gets a visually consistent experience.

If you've got an example that doesn't really fit well into either of these camps, I'd really be interested in hearing about it. Could be a good opportunity for someone who wanted to write a useful graphics library...

查看更多
在下西门庆
5楼-- · 2020-03-04 09:18

I'm not in anyway an expert but when I messed around with both I found XNA way better. I just goof around with my Zune and PC gaming. I didn't have enough time to mess with DirectX and I found way more examples for XNA.

You also have a whole community to help you.

查看更多
时光不老,我们不散
6楼-- · 2020-03-04 09:24

If it's not game related what is it about? If you answer this we might give you a good answer, anyway depending on the application WPF might be a good answer.

查看更多
Anthone
7楼-- · 2020-03-04 09:24

Yap, too bad MS discontinued MDX. I'm currently using SlimDX for our non-game development. It's not a drop-in replacement for MDX, but at least the API design is quite intuitive compare to MDX v1.1's API. I've used MDX v1.1 + .Net v1.1 for version 1 of our product. As for version 2, we're migrating over to .Net 2.0. MDX v1.1 doesn't works well with .Net 2.0, plus it has quite a bit of other inherent problem. Thus we had to scout for alternative.

Initially XNA was our best choice. Then, because it target gaming market and compatibility with xbox 360, we found that we need to write a lot of workaround/hacks to make it works for us. The worse is interoperability with DirectShow, which we use extensively in our product. MS created a huge gap in between existing and the new technology, where the latest replacement for MDX and DirectShow is not powerful enough to replace the old ones at the moment, and we can't afford wait for the next version.

I wouldn't say SlimDX is the best for non-gaming development. But for my case, it is. And since it's OpenSource, we can always make changes to places where we see fit. There exist quite a will glitches when we use SlimxDX + DirectShow.Net. These glitches doesn't exist when we're using MDX 1.1 + DirectShow.Net. My guess is, internally, MS put in quite a bit of hacks to make it work.

Anyway, if you're not using DirectShow at all, do consider Ogre3D/MOgre3D. MOgre3D is a manged wrapper for Ogre3D, a well built 3D engine. It was our first choice, but we can't use it because it doesn't support DirectShow well.

查看更多
登录 后发表回答