3
\$\begingroup\$

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?

\$\endgroup\$
5
\$\begingroup\$

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++.

\$\endgroup\$
3
  • \$\begingroup\$ 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. \$\endgroup\$ – Jonathan Hartley Nov 25 '10 at 7:49
  • 2
    \$\begingroup\$ @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. \$\endgroup\$ – Soonts Nov 26 '10 at 15:58
  • \$\begingroup\$ Yeah, good call Soonts. Very fair. \$\endgroup\$ – Jonathan Hartley Nov 28 '10 at 12:40
2
\$\begingroup\$

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)?

\$\endgroup\$
1
  • \$\begingroup\$ Thank you, this was very helpful, but not 100% the answer I was looking for. \$\endgroup\$ – Latency Nov 17 '10 at 4:05
-1
\$\begingroup\$

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

\$\endgroup\$
0

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