WinFX and XNA Framework
Hi,
How exactly is WinFX related to XNA Framework? WinFX is also a class library that can handle 2D and 3D in a window environment. I guess WinFX targets apps and XNA targets games, but is there a clearer definition of the relation between the two?
[261 byte] By [
mrpu] at [2008-2-3]
WinFX is more than a class library for handling 2D and 3D. WinFX is the .NET Framework 3.0. Call it .NET 2.0++
. The XNA Framework is "the set of managed (.NET) libraries based on the .NET Framework 2.0 that developers use." (from the FAQ)
Q: What exactly is the XNA Framework?
A: The XNA Framework allows game developers to create modern games using the C# programming language and a rich set of development libraries. The XNA Framework provides its own content pipeline to make it easy to get rich content (3D, 2D, sound, etc.) from content creation sources into a game. The XNA Framework also provides a very high level of API unification across the Windows and 360 implementations, thus virtually eliminating the cost and effort required to port games between these two platforms.
Again, from the FAQ
Thanks for answering.
My bad, the question is not about the entire WinFX/Framework 3, but the part of Framework 3 that is called Windows Presentation Foundation (WPF). Why present two different frameworks that have the task of creating 2D/3D content? Why is not XNA = WPF (or vice versa)?
WinFX is more useful for apps and will target windows obviously. There will be no serious 3D games developed with WinFX (like there are no 3D games using GDI).
XNA on the other hand will be quite useless for Desktop apps, I guess users will either stay with some old Win API (e.g. GDI or existing DirectX modules) or adopt to WinFX.
XNA is for games and multimedia, and with network support in the future there will be a lot of interessting "other" stuff coming out too. Hmm, Google Earth on XBox, hehe ...
abi at 2007-8-30 >

mrpu wrote: |
| My bad, the question is not about the entire WinFX/Framework 3, but the part of Framework 3 that is called Windows Presentation Foundation (WPF). Why present two different frameworks that have the task of creating 2D/3D content? Why is not XNA = WPF (or vice versa)? |
|
WPF and the XNA Framework are entirely independent of one another, and are designed for two completely different purposes (one for business/information apps, the other for games). WPF has definite "airspace issues" with DirectX (which XNA is built on), so they don't even really play nicely together.
Multimedia apps, but surely that's overlap with WPF?
Take the namesapce System.Windows.Media - which is in WPF.
I understand the different markets, and the control over texture loading etc. but doesn't it make sense to have a good integration story? Ideally WPF apps should be able to run on top of XNA, and therefore run on the XBOX 360.
The way to think about it is that, in the abstract, WPF and the XNA Framework are in roughly the same spot in the stack. We both sit on top of native D3D and have application models, APIs for interfacing with the GPU, input, etc... and we both use various parts of the BCL (base class libraries).
The differences are large though. WPF has alot of infrastructure around making "traditional applications" richer. 2D animation, styling, etc... WPF also has the goal of reaching a wide variety of Windows configurations. This means they require software fallbacks when the hardware can't do what they need. There are obviously good scenarios for this kind of tech but this richness and flexibility comes at a price in terms of performance and complexity. The goal of the XNA Framework is to provide a base set of simpler class libraries that allow developers to write code closer to the hardware and we intentionally have taken the route that we require GPU hardware.
Any integration between XNA Framework and WPF would likely need to be at the D3D level and therefore has the same problems David mentioned above in addition to the fact that, on Xbox, integrating two managed runtimes in the native layer (i.e. D3D) has its own challenges. The XNA Framework team and the WPF 3D team try to stay in sync on our respective goals and look for opportunities for interop. We won't have anything in v1 of either API that speaks to this but if the demand is there we'll look into it more deeply.
Paul
Thanks for the response.
I think it makes sense to align these solutions so it becomes more of a layered stack rather than peer technologies that can't live in the same 'airspace'. There are now seemingly three separate strategic solutions for developing rich multimedia applications - XNA, WPF and the MCE native mark-up language.
They might have their own individual goals but I think it would be easier to plan investment in one of these technologies if we knew how they will sit alongside their peers in the future.
We'll definitely be shooting for some form of alignment but I suspect you'll see differentiated offerings from Microsoft for the foreseeable future just because the customer demands are so different. The technical approach of layering should help with that (and that might be where we'll put more effort going forward) but I would still expect APIs and Frameworks that target different application types. For better or worse there is still a difference between a "rich multimedia application" and a "game". But, yeah, we need to work toward stacks that "play better together" for sure.
Paul