mirror of
https://thingvellir.net/git/overte
synced 2025-03-27 23:52:03 +01:00
Merge pull request #16370 from AndrewMeadows/secondary-shadows
DEV-2293: secondary canera shadow config should recognize performance tier restrictions
This commit is contained in:
commit
fbb47bcfbb
1 changed files with 8 additions and 1 deletions
|
@ -82,11 +82,18 @@ void RenderScriptingInterface::forceShadowsEnabled(bool enabled) {
|
|||
_shadowsEnabled = (enabled);
|
||||
_shadowsEnabledSetting.set(enabled);
|
||||
|
||||
auto lightingModelConfig = qApp->getRenderEngine()->getConfiguration()->getConfig<MakeLightingModel>("RenderMainView.LightingModel");
|
||||
auto renderConfig = qApp->getRenderEngine()->getConfiguration();
|
||||
assert(renderConfig);
|
||||
auto lightingModelConfig = renderConfig->getConfig<MakeLightingModel>("RenderMainView.LightingModel");
|
||||
if (lightingModelConfig) {
|
||||
Menu::getInstance()->setIsOptionChecked(MenuOption::Shadows, enabled);
|
||||
lightingModelConfig->setShadow(enabled);
|
||||
}
|
||||
auto secondaryLightingModelConfig = renderConfig->getConfig<MakeLightingModel>("RenderSecondView.LightingModel");
|
||||
if (secondaryLightingModelConfig) {
|
||||
Menu::getInstance()->setIsOptionChecked(MenuOption::Shadows, enabled);
|
||||
secondaryLightingModelConfig->setShadow(enabled);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue