Game Development Stack Exchange is a question and answer site for professional and independent game developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Are there any good tutorials, for someone new to DirectX development? I'd like to use the SharpDX library in a project, but am completely new to this sort of graphics programming. I'm looking for a good resource for very beginner-level DirectX samples, either on the web or in print? I assume the code there will be C++, but I'm hoping they'll be straightforward enough for me to map to C#.

share|improve this question

closed as not constructive by bobobobo, Byte56, Sean Middleditch, bummzack, Tetrad Mar 5 '13 at 22:34

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.If this question can be reworded to fit the rules in the help center, please edit the question.

D3D9, 10 or 11? – Josh Petrie Mar 6 '12 at 22:41
D3D10 is probably all I would need for now. – Josh Santangelo Mar 6 '12 at 23:48

You might want to have a look at Microsoft XNA. It's not the whole DirectX deal but it comes close in terms of features. To understand the interface, you need (basically) no prior knowledge of DirectX/C++. It comes with its own abstractions and might thus be more approachable for you if you don't need as much low-level access as DirectX (and its managed wrappers) would normally allow. Furthermore, the XNA Game Studio should come with some samples and tutorials that make it easier to get into graphics programming.

I'm sorry I can't say for sure, though, as I've only gone the C++/DirectX route myself.

share|improve this answer
Note that is it a bit misleading to call XNA "completely C#" as compared to SlimDX or SharpDX -- XNA wraps around a native Direct3D interface in basically the same way SlimDX and SharpDX do. – Josh Petrie Mar 6 '12 at 22:39
You're absolutely right. I was trying to get to the fact that the interface exposed by the framework is not "just a wrapper" but comes with its own abstractions that people not familiar with DirectX might find more approachable. Trying to clarify that now. Also, strictly speaking, XNA is the name for that whole Microsoft game initiative (see XNA Math, now rebranded as DirectX Math) and not just the managed efforts but it seems they are trying to draw a more stringent distinction there as of late. – Koarl Mar 6 '12 at 22:48
Not really related but XNA math was called as such because it evolved out of the old XNA (When XNA was the name for the Registered Developer's development kit), not because it was part of XNA. – Matt Jensen Mar 6 '12 at 23:11
I'm a fan of XNA, but the problem is that I need to compose my raw DirectX graphics with WPF. Every example I've seen of WPF+XNA hasn't worked very well, but SharpDX/SlimDX have WPF compositing examples that work well. – Josh Santangelo Mar 6 '12 at 23:48
@JoshSantangelo I've been recently working on a WPF+XNA editor and in my opinion it has worked fantastically. I used this way: I know that some consider it somewhat hacky since it uses Game-class and initializes the game with reflector hacks but it has worked perfectly for me! – flai Mar 2 '13 at 13:03 has some pretty easy to follow tutorials on programming wwith DirectX directly from c++ or with XNA. Helped me a lot!

share|improve this answer

Excuse the self promotion, but I'm in the process of writing some tutorials for Windows 8 Metro using SharpDX and C#, starting from the basics. You can find them in my blog.

Jose Fajardo has a collection of SharpDX demos, but since they use XAML interop, they are pretty hard to understand unless you have some knowledge of Windows 8 development.

And the full package of SharpDX comes with some nice examples, too.

share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.