Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

DirectX programming on Windows, what is the preferred way?

I need to develop a part of a business application in a flashy eye candy way. Therefore wanted to see if I can use DirectX. Here's what I got.

  1. First I read how using C/C++ is like shooting yourself on the foot and I should use DirectX.NET instead. I couldn't disagree. It's the 21st century.

  2. Downloaded DirectX SDK but couldn't find the .NET assemblies in there. Searching the net now revealed that DirectX .NET (called MDX) is now obsolete (released in 2006). And that I should use XNA instead which was mainly developed for XBOX.

  3. Downloaded XNA. But it won’t install because I don't have C#.NET Express 2005 SP1. Installed SP1 on my VS Pro 2005. But it won’t install still. It needs Express 2005 and exactly that single one version, not Pro, clearly not 2008.

  4. Frustrated tried to download C#.NET Express which is free. But the link from MS which says C#.2005 actually downloads C#.2008, because C#.2005 is now obsolete.

  5. And now I read that MS is now putting it's force behind WPF/silverlight. And XNA doesn't support DX10 and Vista doesn't come with DX9.

Now I have two choices:

  1. Go 15 years back and code in plain old C/C++. At least C has proven itself to be timeless.

  2. Try silverlight.

What would be your advice? Or am I missing something?

Udpate: Would like to add that DX10 is not backward compatible with any other DX version. SlimeDX looks really promissing. But as a very new package, I am not sure how much helpful the documentation and tutorials will be.

Udpate 2: It seems that the first download link that google brings up when searching for XNA download, which I used, is not the latest one. Thanks DouglasH for providing the link to v.3. Downloaing it. Probably it will work.

But then agian. Should I switch to WPF/Silverlight? Or go with XNA? Which one is better documented and future-profe?

More update: Vista realy doesn't come with DirectX 9 preinstalled [check by googling]. At least it didn't on my machine bnough last year. Googling for it revealed that I have to manually install DirectX 9 on Vista after downloading it from MS. But my attemet failed beucase hardware drivers for DX9/vista were missing or didn't work. I got the idea that it's not supported that well.

like image 529
CDR Avatar asked Apr 23 '09 09:04

CDR


3 Answers

MS has stopped supporting the .net DirectX libraries. There is an open source alternative called SlimDX, and it works well. The documentation leaves some to be desired, but it can be puzzled together by using the DirectX C++ documentation and some common sense.

like image 92
erikkallen Avatar answered Nov 15 '22 11:11

erikkallen


WPF does pretty good 3D stuff, and there are lot of fish eye panels and source code available for WPF, yes since MS has gone ways from their technology, in today's terms, we can not focus on only one technology by MS to make entire one business application.

Sure we are also tired of using multiple different versions of technologies even to do smallest parts, but I believe they are doing great job by serving billion machines, it sure isnt easy but WPF and .NET seem to be most stable technologies by microsoft and also they are spending good money on making completely managed operating system as well.

like image 31
Akash Kava Avatar answered Nov 15 '22 11:11

Akash Kava


If you ever go back to C or C++, you might want to check out Simple DirectMedia Layer (SDL).

IMHO, it is much easier than DirectX.

URL: http://www.libsdl.org/

like image 32
Hideo Avatar answered Nov 15 '22 11:11

Hideo