Loading a static mesh from a file
In this recipe, we will create a mesh renderer that renders meshes loaded from a compiled mesh object (
.CMO) file. We will use the Visual Studio graphics content pipeline to compile an Autodesk FBX model that has been exported from the open source 3D modeling and animation software, Blender (blender.org).
Common.Mesh within the provided sample framework will be used to load the
.CMO file format and to store the loaded mesh. The loaded mesh will contain the vertex and index buffers along with material and lighting parameters and can also include the name of textures and pixel shaders to use.
This recipe assumes that a right-handed coordinate system is being used; see the previous recipe,