Complicated geometry is usually modeled using 3D modeling software, after which the model is saved to a file. An example of this is the .x file format. Direct3D uses meshes to load the objects from these files. Meshes are somewhat complicated, but D3DX contains functions that make using meshes easier. The Meshes sample project introduces the topic of meshes and shows how to load, render, and unload a mesh.
This tutorial shows how to load, render, and unload a mesh using the following steps.
The path of the Meshes sample project is: (SDK root)\Samples\C++\Direct3D\Tutorials\Tut06_Meshes
The sample code in the Meshes project is nearly identical to the sample code in the Lights project, except that the code in the Meshes project does not create a material or a light. This tutorial focuses only on the code unique to meshes and does not cover setting up Direct3D, handling Windows messages, rendering, or shutting down.