Ogre::MaterialPtr material = Ogre::MaterialManager::getSingleton().getByName("my_material"); Ogre::Technique* technique = material->getTechnique(0);
Ogre::MaterialPtr material = Ogre::MaterialManager::getSingleton().getByName("my_material"); int techniqueIndex = material->getNumTechniques() - 1; Ogre::Technique* technique = material->getTechnique(techniqueIndex);In this example, we retrieve the last technique of a material named "my_material". These examples are part of the OGRE Graphics Rendering Engine library package.