In this recipe, we'll show you how to create a Mebius mesh with multiple sections, using a ManualObject
. We'll also add menu items to our application's user interface, so that the user can change the material used by each section at runtime.
To follow along with this recipe, open the solution located in the Recipes/Chapter03/ManualObject
folder in the code bundle available on the Packt website.
1. First, we create an MFC Ogre application named
ManualObject
.2. Next, we create a Mebius mesh with multiple sections using code similar to what we used in the Creating a custom resource manager recipe, from Chapter 1, Delving Deep into Application Design. The
Materials
array contains the names of all the materials we will be using.Ogre::String Materials[] = { "Examples/SphereMappedRustySteel", "Examples/OgreLogo", "Examples/BeachStones", "Examples/TrippySkyBox", "Examples/SpaceSkyBox", "Examples/DynamicCubeMap", "Examples/RustySteel...