Showing the changes to interface/src/scripting/RenderScriptingInterface.cpp (1 of 7 files). Show all
Unified · Split
| @@ -30,11 +30,13 @@ void RenderScriptingInterface::loadSettings() { · 29 unmodified lines | |||
| 30 | _shadowsEnabled = (_shadowsEnabledSetting.get()); | 30 | _shadowsEnabled = (_shadowsEnabledSetting.get()); |
| 31 | _ambientOcclusionEnabled = (_ambientOcclusionEnabledSetting.get()); | 31 | _ambientOcclusionEnabled = (_ambientOcclusionEnabledSetting.get()); |
| 32 | _antialiasingEnabled = (_antialiasingEnabledSetting.get()); | 32 | _antialiasingEnabled = (_antialiasingEnabledSetting.get()); |
| 33 | _viewportResolutionScale = (_viewportResolutionScaleSetting.get()); | ||
| 33 | }); | 34 | }); |
| 34 | forceRenderMethod((RenderMethod)_renderMethod); | 35 | forceRenderMethod((RenderMethod)_renderMethod); |
| 35 | forceShadowsEnabled(_shadowsEnabled); | 36 | forceShadowsEnabled(_shadowsEnabled); |
| 36 | forceAmbientOcclusionEnabled(_ambientOcclusionEnabled); | 37 | forceAmbientOcclusionEnabled(_ambientOcclusionEnabled); |
| 37 | forceAntialiasingEnabled(_antialiasingEnabled); | 38 | forceAntialiasingEnabled(_antialiasingEnabled); |
| 39 | forceViewportResolutionScale(_viewportResolutionScale); | ||
| 38 | } | 40 | } |
| 39 | 41 | ||
| 40 | RenderScriptingInterface::RenderMethod RenderScriptingInterface::getRenderMethod() const { | 42 | RenderScriptingInterface::RenderMethod RenderScriptingInterface::getRenderMethod() const { |
| @@ -159,7 +161,7 @@ void RenderScriptingInterface::setViewportResolutionScale(float scale) { · 118 unmodified lines | |||
| 159 | void RenderScriptingInterface::forceViewportResolutionScale(float scale) { | 161 | void RenderScriptingInterface::forceViewportResolutionScale(float scale) { |
| 160 | _renderSettingLock.withWriteLock([&] { | 162 | _renderSettingLock.withWriteLock([&] { |
| 161 | _viewportResolutionScale = (scale); | 163 | _viewportResolutionScale = (scale); |
| 162 | // _antialiasingEnabledSetting.set(enabled); | 164 | _viewportResolutionScaleSetting.set(scale); |
| 163 | 165 | ||
| 164 | auto renderConfig = qApp->getRenderEngine()->getConfiguration(); | 166 | auto renderConfig = qApp->getRenderEngine()->getConfiguration(); |
| 165 | assert(renderConfig); | 167 | assert(renderConfig); |
| @@ -173,19 +175,5 @@ void RenderScriptingInterface::forceViewportResolutionScale(float scale) { · 7 unmodified lines | |||
| 173 | if (forwardView) { | 175 | if (forwardView) { |
| 174 | forwardView->setProperty("resolutionScale", _viewportResolutionScale); | 176 | forwardView->setProperty("resolutionScale", _viewportResolutionScale); |
| 175 | } | 177 | } |
| 176 | /* | ||
| 177 | auto mainViewJitterCamConfig = qApp->getRenderEngine()->getConfiguration()->getConfig<JitterSample>("RenderMainView.JitterCam"); | ||
| 178 | auto mainViewAntialiasingConfig = qApp->getRenderEngine()->getConfiguration()->getConfig<Antialiasing>("RenderMainView.Antialiasing"); | ||
| 179 | if (mainViewJitterCamConfig && mainViewAntialiasingConfig) { | ||
| 180 | Menu::getInstance()->setIsOptionChecked(MenuOption::AntiAliasing, enabled); | ||
| 181 | if (enabled) { | ||
| 182 | mainViewJitterCamConfig->play(); | ||
| 183 | mainViewAntialiasingConfig->setDebugFXAA(false); | ||
| 184 | } | ||
| 185 | else { | ||
| 186 | mainViewJitterCamConfig->none(); | ||
| 187 | mainViewAntialiasingConfig->setDebugFXAA(true); | ||
| 188 | } | ||
| 189 | }*/ | ||
| 190 | }); | 178 | }); |
| 191 | } | 179 | } |