void OgreSetup::Config_ogreLogChanged(const std::string& section, const std::string& key, varconf::Variable& variable) { if (variable.is_string()) { auto string = variable.as_string(); if (string == "low") { Ogre::LogManager::getSingleton().getDefaultLog()->setLogDetail(Ogre::LL_LOW); } else if (string == "normal") { Ogre::LogManager::getSingleton().getDefaultLog()->setLogDetail(Ogre::LL_NORMAL); } else if (string == "boreme") { Ogre::LogManager::getSingleton().getDefaultLog()->setLogDetail(Ogre::LL_BOREME); } } }
void MainCamera::Config_Compositors(const std::string& section, const std::string& key, varconf::Variable& variable) { if (variable.is_string()) { const std::vector<std::string> tokens = Tokeniser::split(variable.as_string(), ","); for (std::vector<std::string>::const_iterator I = tokens.begin(); I != tokens.end(); ++I) { enableCompositor(*I, true); } std::vector<std::string> compositorsToDisable; for (CompositorNameStore::const_iterator I = mLoadedCompositors.begin(); I != mLoadedCompositors.end(); ++I) { if (std::find(tokens.begin(), tokens.end(), *I) == tokens.end()) { compositorsToDisable.push_back(*I); } } for (std::vector<std::string>::const_iterator I = compositorsToDisable.begin(); I != compositorsToDisable.end(); ++I) { enableCompositor(*I, false); } } }