Ogre::MaterialPtr matPtr = Ogre::MaterialManager::getSingleton().load("MyMaterial", "MyMaterialGroup");
Ogre::MaterialPtr matPtr = Ogre::MaterialManager::getSingleton().load("MyMaterial", "MyMaterialGroup", Ogre::ResourceGroupManager::AUTODETECT_RESOURCE_GROUP_NAME);
Ogre::MaterialPtr matPtr = Ogre::MaterialManager::getSingleton().getByName("MyMaterial");In this example, the MaterialManager's getByName function is used to retrieve a MaterialPtr object for an already-loaded material with the identifier "MyMaterial". Cpp Ogre is typically packaged as a library that can be included in C++ projects. The most common package library for Cpp Ogre is the Ogre SDK, which includes all of the necessary libraries and tools for developing with Ogre.