Thursday, March 3, 2011

Direct3D MDI Project: MFC or .NET?

I'm looking at a new project where both Native and Managed approaches sound like a good idea. This is a Windows desktop application which should support an MDI interface. The client area will make extensive use of Direct3D. The developers on the project are equally skilled on C#, C++/CLI and MFC.

MFC Advantages:

  • Doc/View Architecture
  • Most Direct3D online resources still use C++

Managed Code Advantages:

  • The .NET Framework
  • C#

What more can I add to the lists above? Don't flame this. Two lists. Just add to them.

Note: I have very good reasons (to do with the IDE and debugging) not to use mixed mode. So count that out.

From stackoverflow
  • This doesn't directly add to either list, but the current "recommended" way to do 3D with .NET is using XNA - Managed DirectX is being deprecated.

    Edit: Of course, WPF 3D is also an option! Forgot about that :}

    Vulcan Eager : Woah! What you said about XNA is news to me. Any pointers?
    moobaa : http://en.wikipedia.org/wiki/Microsoft_XNA , at a guess ;)
    Vulcan Eager : Nah. Pointers as to why MDX is being deprecated in favor of XNA?
    moobaa : Not off the top of my head, sorry... it's fallen into the realms of "assumed knowledge" :}
  • Why not use both?

    You can write the UI (forms) using C#/VB.NET and render the window using C++.

    Basically all you need to do is pass the HWND (Window Handle) from the C# to the C++ and initialize the C++ using that value.

    You can see an example on my blog: How-to Render managed (.NET) form using native DirectX

0 comments:

Post a Comment