Take the 2-minute tour ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

I was wondering what do you need to know in C++ before starting to program with DirectX?

I have only been programming in C++ (more for 2D games using SDL and learning the basics) for just over a year, I was wondering what kind of concepts and methods should someone be knowledgeable with or at least have seen before, before attempting to learn how to use Direct X?

share|improve this question
add comment

3 Answers

up vote 5 down vote accepted

Direct3D itself does not require you to know C++. You'll need to understand function pointers and structure layouts from C.

However, to design a good architecture for even a simple game, you'll better be good in C++.

share|improve this answer
    
Hey. Agreed - also, note that C++ is noted for being a language which is bloated with features, which interact in irksome ways. There is an argument to be made that sometimes it is better to use a simple and well-understood subset of C++ that isn't too far off plain old C, in order to produce programs that are more maintainable. –  Jonathan Hartley Nov 25 '10 at 7:49
2  
@Tartley, I mostly agree. For example take a look at the Alexandrescu's Loki library for many examples on "how to code C++ so that no one else will ever understand". However, there are also C++ concepts that improve code quality compared to the C, when used properly. Data encapsulation, pure virtual interfaces, RIIA resource management classes, and ATL/STL template containers, to name a few. –  Soonts Nov 26 '10 at 15:58
    
Yeah, good call Soonts. Very fair. –  Jonathan Hartley Nov 28 '10 at 12:40
add comment

http://msdn.microsoft.com/en-us/library/ee416804(v=VS.85).aspx

I'm assuming if you can follow the tutorials then you know enough.

Link blatantly stolen from an answer in this question: What are the current books for DirectX (w/ focus on 3D)?

share|improve this answer
    
Thank you, this was very helpful, but not 100% the answer I was looking for. –  Latency Nov 17 '10 at 4:05
add comment

You don't need any C++ for DirectX programming, so just use however much or little C++ you're comfortable with.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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