本文整理汇总了C++中ogre::Technique::isSupported方法的典型用法代码示例。如果您正苦于以下问题:C++ Technique::isSupported方法的具体用法?C++ Technique::isSupported怎么用?C++ Technique::isSupported使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ogre::Technique
的用法示例。
在下文中一共展示了Technique::isSupported方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: loadMaterialControlsFile
void loadMaterialControlsFile(MaterialControlsContainer& controlsContainer, const Ogre::String& filename)
{
// Load material controls from config file
Ogre::ConfigFile cf;
try
{
cf.load(filename, Ogre::ResourceGroupManager::DEFAULT_RESOURCE_GROUP_NAME, "\t;=", true);
// Go through all sections & controls in the file
Ogre::ConfigFile::SectionIterator seci = cf.getSectionIterator();
Ogre::String secName, typeName, materialName, dataString;
while (seci.hasMoreElements())
{
secName = seci.peekNextKey();
Ogre::ConfigFile::SettingsMultiMap* settings = seci.getNext();
if (!secName.empty() && settings)
{
materialName = cf.getSetting("material", secName);
Ogre::MaterialPtr curMat = Ogre::MaterialManager::getSingleton().getByName(materialName);
curMat->load();
Ogre::Technique * curTec = curMat->getBestTechnique();
if (!curTec || !curTec->isSupported())
{
continue;
}
MaterialControls newMaaterialControls(secName, materialName);
controlsContainer.push_back(newMaaterialControls);
size_t idx = controlsContainer.size() - 1;
Ogre::ConfigFile::SettingsMultiMap::iterator i;
for (i = settings->begin(); i != settings->end(); ++i)
{
typeName = i->first;
dataString = i->second;
if (typeName == "control")
controlsContainer[idx].addControl(dataString);
}
}
}
Ogre::LogManager::getSingleton().logMessage( "Material Controls setup" );
}
catch (Ogre::Exception e)
{
// Guess the file didn't exist
}
}