|Direct3D9 Tutorials in C++|
My primary goal in doing these tutorials is to learn. By developing these tutorials I hope to learn my way around Direct3D much quicker than I would otherwise. Also I hope to be able to provide a valuable resource for others who want to learn.These examples may not always illustrate the best way to do things. I'm (mostly) human and fallible. I'm open to (constructive) criticism, if you have a better way of doing something, let me know.
These tutorials primarily cover Direct3D9, though other bits (notably DirectInput) maybe be covered to some degree. The DirectX SDK is required to compile them. The tutorials are written in C++, but I avoid using complex features of the language. If you can handle some simple objects then you know enough C++ to get by here.
I've created a mailing list to announce new site content. The Tutorial Announce list can only be posted to by me. Whenever I add a tutorial or update a tutorial, I'll send out an email to the list. No spamming. You can sign up to the Announce List here.
For further help I highly recommend the very active community at www.GameDev.net.
These tutorials have been tested with the December 2006 version of the DirectX 9 SDK and compiled with Visual Studio 2005. Some changes may be required to the code if you are using a different version.
|Frequently Asked Questions that often come my way. Just to be nice, I provide some answers too!|
|Tutorial FAQ||Questions regarding my tutorials|
|Direct3D FAQ||Questions regarding Direct3D in general|
|Getting It Together|
|All the things you need before you can start playing with the code.|
|What You Need||The things you need to gather|
|Setting Up||Installing the toys you've gathered|
|Debug Info||Setting up and viewing DirectX's Debug Spew|
|How to open a display and render simple things to it.|
|Windows Primer||How to create a window and handle basic messages in C++/Win32|
|Initializing Direct3D||Initializing Direct3D and creating a Direct3D Device. C++|
|3D Primer||A brief discussion of vertices and other concepts|
|Points||How to cover your display with lots and lots of dots|
|Lines||The shortest path between 2 points is a straight line. Here's how to draw some.|
|Triangles||Fans, Strips and Lists|
|Vertex Buffers||Now that you can render the basic primitives, here's how to do it faster.|
|Model Space||Rendering an object defined in Model Space|
|World Transform||Translation, Rotation and Scaling|
|3D Objects||So far we've only rendered flat 2-dimensional objects. Now we'll render real 3D objects|
|Textured Quad||An example of applying a texture to a simple quad|
|Blending: Vertex Alpha||Alpha blending with a per-vertex transparency.|
|Text and Fonts|
|Various methods of drawing text|
|Introduction to D3DXFont||A look at the new D3DXFont interface that was introduced in the DX9 2003 Summer Update|
|3D Text||Using D3DX to create a mesh from text|