Reputation: 3
One interfaces with XNA through C#, but does anyone know what language the library itself is implemented in?
Upvotes: 0
Views: 379
Reputation: 27195
From the former XNA lead, Shawn Hargreaves:
much of XNA itself is written in C++
By this, I expect that Shawn specifically means C++/CLI, given that the vast majority of XNA is managed code.
The unique feature of C++/CLI is that it is very good for writing code that bridges between the native and managed universes, including features that aren't available from C#. In particular you can mix native and managed code in the one assembly, and call native code directly from managed code.
XNA makes extensive use of DirectX (plus a few other things), which is native code, thus making C++/CLI an excellent choice.
Of course, XNA handles all the native stuff so that you don't have to. Stick to C# wherever possible.
Upvotes: 2