DirectX programming on Windows, what is the preferred way?
Asked Answered
T

6

5

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.

Tilley answered 23/4, 2009 at 9:31 Comment(4)
well with XNA you do have an option to write games for xbox 360, pc and the Zune. Future proof?? is there anything that is truely future proof?? C++/direct X is where True 3d computer games are going to be at for the lowest level just because of performance. although mono has done some work with SSE and other game aspects. tirania.org/blog/archive/2009/Apr-09.html. I personally say use the best tool for the job and that could be any of those technologies.Detailed
on the directx 9 in Vista. the DWM may link in the DLLs that it needs but it is built on DirectX 9, and is the reason that DirectX 9 hardware or above is required for Aero to work. msdn.microsoft.com/en-us/library/bb757031.aspxDetailed
It is true that nothing is future proof. I was actually being paranoid of finding that a technology is dumped just after 2 years of starting development.Tilley
I will state a view of WPF/Silverlight. the plan of record is to further integrate WPF into Visual Studio and this has been confirmed through the next 3 versions.Detailed
D
1

couple of points, which version of XNA did you download. Here is the link for XNA Studio 3.0 which will run on Visual Studio 2008. http://www.microsoft.com/downloads/details.aspx?FamilyId=7D70D6ED-1EDD-4852-9883-9A33C0AD8FEE&displaylang=en

2nd, I sure hope that Vista has Direct X 9, since that is the version of direct X that the DWM runs on in Vista. I think you will find the DLLs for Direct X 9 and before and the DLL,s for DirectX 10 loaded in Vista. Or for that Matter Windows 7 which will also have directX 11 (edit 2 note that the DWM is built on DirectX10, with a software emulator for systems that don't have 3d video hardware, a dx10ondx9 drivers for those with directx 9 cards and of course full support for directx 10 cards).

edit,

Additionally if you downloaded the March directx sdk, you download, directx 9.0c, directx 10, 10.1 and the beta of directX 11. and I would have to check if DirectX 8.x is still included or not although DirectX 9 is backwards compatible with most of that platform.

Detailed answered 23/4, 2009 at 10:1 Comment(0)
A
4

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.

Amygdalate answered 23/4, 2009 at 9:36 Comment(0)
S
4

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.

Sardis answered 23/4, 2009 at 9:43 Comment(0)
S
2

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/

Shoshone answered 23/4, 2009 at 9:44 Comment(1)
I'd second SDL. There's a great tutorial here: lazyfoo.net/SDL_tutorials/index.phpMessroom
T
2

DirectX is fully backwards-compatible. Any DX9 application will run on Vista and DX10. As for XNA and VS2005 - that's a bit weird. That would make XNA effectively useless. Check if you haven't missed something.

Topography answered 23/4, 2009 at 9:45 Comment(2)
DirectX 10 is not backward compatible with DirectX 9. Though everything was backward compatible with each other prior to DX10. MS broke that in DX10.Tilley
But DX9 applications still run on Vista. So why not use that?Topography
D
1

couple of points, which version of XNA did you download. Here is the link for XNA Studio 3.0 which will run on Visual Studio 2008. http://www.microsoft.com/downloads/details.aspx?FamilyId=7D70D6ED-1EDD-4852-9883-9A33C0AD8FEE&displaylang=en

2nd, I sure hope that Vista has Direct X 9, since that is the version of direct X that the DWM runs on in Vista. I think you will find the DLLs for Direct X 9 and before and the DLL,s for DirectX 10 loaded in Vista. Or for that Matter Windows 7 which will also have directX 11 (edit 2 note that the DWM is built on DirectX10, with a software emulator for systems that don't have 3d video hardware, a dx10ondx9 drivers for those with directx 9 cards and of course full support for directx 10 cards).

edit,

Additionally if you downloaded the March directx sdk, you download, directx 9.0c, directx 10, 10.1 and the beta of directX 11. and I would have to check if DirectX 8.x is still included or not although DirectX 9 is backwards compatible with most of that platform.

Detailed answered 23/4, 2009 at 10:1 Comment(0)
P
1

Though I never worked directly with DirectX (little bit with OpenGL) - I would take WPF. The least-painful to implement (transparency, gradients, brushes, animations, etc.) and it provides solid-performance from what I have seen and experienced myself. But yes, it's not platform-independent.

Pogue answered 23/4, 2009 at 10:24 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.