Everything we are going to add this time is going in the createScene()
function:
As we already know we need a plane definition, so add one:
Ogre::Plane plane(Ogre::Vector3::UNIT_Y, -5); Ogre::MeshManager::getSingleton().createPlane("plane", Ogre::ResourceGroupManager::DEFAULT_RESOURCE_GROUP_NAME, plane, 1500,1500,200,200,true,1,5,5,Ogre::Vector3::UNIT_Z);
Then create an instance of this plane, add it to the scene, and change the material:
Ogre::Entity* ground= _sceneManager->createEntity("LightPlaneEntity", "plane"); _sceneManager->getRootSceneNode()->createChildSceneNode()->attachObject(ground); ground->setMaterialName("Examples/BeachStones");
Also we would like to have some light in the scene; add one directional light:
Ogre::Light* light = _sceneManager->createLight("Light1"); light->setType(Ogre::Light::LT_DIRECTIONAL); light->setDirection(Ogre::Vector3(1,-1,0));
And some shadows would be nice:
_sceneManager->setShadowTechnique...