Sign in to follow this  

[.net] Should we migrate to XNA?

This topic is 3644 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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?

Share this post


Link to post
Share on other sites
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]

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites

This topic is 3644 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this