Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Using DirectX with Visual Studio 2012

I have some DirectX projects written in C# that I need to run via Visual Studio 2012 specifically.

All of these projects use the namespace called, "Microsoft.DirectX".

Microsoft Windows SDK installed completely and successfully on my Windows 8 computer, however this namespace is still unrecognised.

My question is, "How do I run and develop DirectX apps using a combination of C#, Visual Studio 2012 and MS Windows SDK?"

like image 874
Radek Wyroslak Avatar asked Oct 11 '12 08:10

Radek Wyroslak


3 Answers

I would recommend you to have a look at SharpDX. This is a thin managed access to DirectX and the API is very similar to the unmanaged version (SharpDX is automatically built from the unmanaged c++ header files). AFAIK this is currently the fastest managed aproach to use DirectX.

A very important thing might be the fact that you are able to develop Win8-Metro-Apps, too. AFAIK this is not possible/allowed with every other lib. I mentioned this because you wrote you want to develop on/for Win8 but you didn't said what kind of app. Metro-Apps has some more restrictions than Desktop-Apps for Win8.

Managed DirectX is out of date as already mentioned. But it seems that XNA is also not longer maintained since the release of the last version 4. So you are stuck if you want to use modern DX10 or DX11 because XNA uses DX9. An alternative here is the ANX framework. This project is currently in an early development stage but seems promising to me. ANX can use DirectX for rendering and uses SharpDX in this case. In contrast to XNA (which is strongly related to only DirectX9) SharpDX has the ability to use other renderers, too (e.g. OpenGL for Linux).

like image 72
Beachwalker Avatar answered Oct 15 '22 06:10

Beachwalker


Managed DirectX is obsolete and no longer maintained by Microsoft as it is being replaced by XNA. Last version to support Managed DirectX was this one (February 2010 release).

You can also give SlimDX a try :

SlimDX is a free open source framework that enables developers to easily build DirectX applications using .NET technologies such as C#, VB.NET, and IronPython. It is designed to be an efficient, simple, and lean wrapper that fully encompasses all of Microsoft's gaming and multimedia technologies and exposes them to managed code. All of the code is under the MIT/X11 license, and all content is under the Creative Commons Attribution-Share Alike license. Our latest release is March 2011, and can be found for users and developers on the Download page.

like image 3
Nasreddine Avatar answered Oct 15 '22 08:10

Nasreddine


You will probably need Microsoft XNA.

like image 1
bitbonk Avatar answered Oct 15 '22 06:10

bitbonk