Graphics Rendering

This section is dedicated to the rendering of graphics using the Direct3D API contained within the DirectX SDK. There are many pages with notes along with answers to common questions.

Demo with source code

I have written a demo that shows off a full Direct3D application that renders a cube in a window. You can download the Visual Studio source code here:

Graphics Index

Index PageTopic PageDescription
Getting StartedHow to get up and running with Direct3D from scratch
 DirectX Q&ASection about DirectX in general including where to get the SDK, latest changes in 9.0c etc.
 Win32 APIDirect3D runs on the Windows operating system and requires the use of some of the Windows API e.g. we must create at least one window and a message loop. This section has pages describing the creation of a basic Windows application along with some more advanced topics like Windows GDI graphics, sound and resources
 Direct 3D SetupOnce we have a Windows application we can start using Direct3D. We must initialise DirectX and create the necessary Direct3D objects used in all our future rendering.
 2D ElementsA lot of games are still in 2D and even 3D games require some 2D elements. This section describes how to load textures, draw sprites and draw text in 2D.
3D RenderingThis section includes many pages on 3D rendering with Direct3D. Pages start from the beginning with drawing simple triangles and then cover more advanced topics like lighting, 3D model loading and animation, creating terrain etc.
 PrimitivesHow to get started creating your own primitives. Includes using flexible vertex formats, vertex and index buffers and the steps required to render a scene using Direct3D.
 Z BufferHow to set up and use a Z buffer.
 MatricesDescribes the 3 matrices used by Direct3D
 LightingDescribes the 3 different types of light Direct3D provides and how materials and lighting works together.
 3D ModelsLoading and displaying a 3D model is very easy using the D3DX library. This section also describes the more complex methods of animating the models.
 StatesThere are many states that can be set that effect the rendering of 3D primitives.
 Graphic TechniquesA number of more advanced techniques like collision handling, skybox, camera, terrain and picking
 Invisible GeometryWhen you cannot see anything go here for suggestions on how to fix the problem.
 EffectsWorking with Microsoft Effect Files (.fx)
 ShadersNotes on writing Vertex and Pixel Shaders
Direct3D FAQAnswers to common questions concerning Direct3D

Further reading

The resources page lists some useful books and links to help with this topic.