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).
The class 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.
Getting ready
This recipe assumes that a right-handed coordinate system is being used; see the previous recipe,
Get Direct3D Rendering Cookbook now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.