[.net] Should we migrate to XNA?

Started by
7 comments, last by daviangel 16 years, 4 months ago
Our lab developed a private software one year ago. The software was written in C# under .net 2.0. The thing was that, the software had to display some 3D models on a WinForm. So we used managed DX 1.1. It's important that the software is not itself a game but a WinForm application, it only uses several directx controls to display some 3D objects. There are no directx windows, just a few directx UI controls simply displaying 3D models that can be viewed and rotated by the user. Now we are going to develop a new edition of the software, and the issue comes. MDX is no longer included in direct sdk and if we continue to use MDX, we have to stick to the Aug 2007 sdk. It seems to us that MDX will become deprecated and be replaced by XNA. Then we took a glance at XNA. Seems it's all about games. Everything is encapsulated in that way and we are even not sure how to create a 3D control instead of window. Seems XNA is totally different from MDX. So my question is: is XNA appropriate in our case and should we stick to MDX or migrate to XNA?
Advertisement
XNA 1.0 can be made to work within winforms. Be aware, though, that the 2.0 beta can't run in winforms. I think it was on their list of things to do, but they had to cut it because they only had so much time.

Never mind. I'm completely wrong.

Have a look around at something called SlimDX. It might suit your needs a bit better.

[Edited by - Moe on December 3, 2007 6:26:30 PM]
Quote:Original post by Moe
XNA 1.0 can be made to work within winforms. Be aware, though, that the 2.0 beta can't run in winforms. I think it was on their list of things to do, but they had to cut it because they only had so much time.


That's incorrect. They were working on a seamless integration from their end. Any method that gets XNA 1.0 running in WinForms will work, with possibly some slight modification due to API changes, with 2.0 and the 2.0 beta.

I use Xna in my engine, without the game class, and render to a winform. I had to make no changes whatsoever when moving over to 2.0.

NickGravelyn is correct, they were planning to allow cleaner winform integration into the Game framework, but dropped that plan. However, you can still do it, it's just awkward.

One important thing I'd consider in your case, is that you can't get Xna to render to multiple windows or controls, while managed directx can. That sounds important to you.

SlimDX is looking VERY good, but I haven't made the switch yet: I'm waiting until it's more feature complete. So I'm just sticking with managed directx until I feel comfortable with switching to slimdx.

If you're feeling really masochistic, you could always use directx natively via c++/clr.
What about the new WPF classes? Aren't they supposed to make 3D applications easier to program?
You can still use XNA as you would Managed DirectX. Just add the references then you still have access to the GraphicsDevice and can use it exactly the same way as you did MDX.

It sounds like you are using swap chains in MDX and these are not in XNA. However, you can get round this by creating a back buffer bigger than all the controls you will be drawing to then using that to present to each control.

Or as someone else said, SlimDX is another option. I haven't tried that yet though.
Quote:Original post by Krisc
What about the new WPF classes? Aren't they supposed to make 3D applications easier to program?

3D applications, not 3D games. I wouldn't use WPF for games. Go with XNA Game Studio.

Former Microsoft XNA and Xbox MVP | Check out my blog for random ramblings on game development

Quote:Original post by gharen2
One important thing I'd consider in your case, is that you can't get Xna to render to multiple windows or controls, while managed directx can.


Incorrect. Check the Creators Club forums. Information on how to do this has been posted there.

Former Microsoft XNA and Xbox MVP | Check out my blog for random ramblings on game development

This should give you enough info to figure out if XNA is the way to go.

For some developers, porting to the XNA Framework is a less than ideal solution. For one, the XNA Framework API has a significant number of naming differences from the native DirectX APIs. Developers employing MDX tool chains to build content for native games may be more comfortable with the MDX conventions. Additionally, the XNA Framework does not have support for run time processing of meshes. This may make the current XNA Framework unsuitable for tools that require run-time import or modification of mesh data.

[size="2"]Don't talk about writing games, don't write design docs, don't spend your time on web boards. Sit in your house write 20 games when you complete them you will either want to do it the rest of your life or not * Andre Lamothe

This topic is closed to new replies.

Advertisement