Click here to Skip to main content
15,880,796 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,

I want to learn how to use DirectX in c#, but I'm new to c# and I want a simple and complete tutorial for it.
Posted
Updated 21-Jan-11 10:36am
v2

The answers already given are valid but if your purpose in wanting to learn DirectX is for game programming, you might be better served to jump to XNA[^] after learning the basics of C#.
 
Share this answer
 
Comments
Steve Maier 21-Jan-11 17:53pm    
XNA can be used for more than just games. We use it at work for medical devices.
Henry Minute 21-Jan-11 17:55pm    
I don't doubt it. My point was that XNA would probably be easier to use than DirectX for a beginner.
Steve Maier 21-Jan-11 17:58pm    
I totally agree with you that it will be easier for a beginner. There also is SlimDX that is pretty simple as well.
Nish Nishant 21-Jan-11 18:13pm    
Voted 5, proposed as answer.

+1 to XNA instead of DirectX for C# development.
You may want to look at SlimDX[^] as an option as well. It ties DirectX into .NET languages for you.
 
Share this answer
 
Comments
Henry Minute 21-Jan-11 18:01pm    
I was not aware of SlimDX. Good suggestion. +5
Steve Maier 21-Jan-11 18:04pm    
Thanks Henry. We switched to it from XNA at work because XNA is only DirectX9 based. We had something working with it but needed some of the functionality of DirectX 10. The APICodePack for Windows 7 would have worked but that did not tie into WPF well, so I got SlimDX to work for us.
Well you have double learning to do, C# and DirectX. Here is one tutorial from CP articles[^].
 
Share this answer
 
Sorry for a trivial answer: learn C# on well on simple projects before going to DirectX.
This is not obvious, too many did the other way around and so invited a lot of trouble.

Also, when you're comfortable with C# and .NET fundamentals, consider skipping DirectX at all and go straight to WPF -- that would be easier. WPF is based on DirectX and packed into .NET wonderfully well (in contrast to original DirectX binding).

You may also consider skipping System.Windows.Forms; I hope this way will go to dead end (not sure yet). I recently worked with young developers who never tried Forms but quickly becoming real experts in WPF: video, imaging hardware, animation, advanced custom control, image recognition (!) -- I would recommend them for any decent team.
 
Share this answer
 
v2
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900