diff --git a/interface/src/scripting/PerformanceScriptingInterface.cpp b/interface/src/scripting/PerformanceScriptingInterface.cpp index a571e305d9..81f1fcd3ad 100644 --- a/interface/src/scripting/PerformanceScriptingInterface.cpp +++ b/interface/src/scripting/PerformanceScriptingInterface.cpp @@ -28,7 +28,7 @@ PerformanceScriptingInterface::PerformancePreset PerformanceScriptingInterface:: } QStringList PerformanceScriptingInterface::getPerformancePresetNames() const { - static const QStringList performancePresetNames = { "Unknown", "Low", "Mid", "High" }; + static const QStringList performancePresetNames = { "UNKNOWN", "LOW", "MID", "HIGH" }; return performancePresetNames; } @@ -41,7 +41,7 @@ PerformanceScriptingInterface::RefreshRateProfile PerformanceScriptingInterface: } QStringList PerformanceScriptingInterface::getRefreshRateProfileNames() const { - static const QStringList refreshRateProfileNames = { "Eco", "Interactive", "Realtime" }; + static const QStringList refreshRateProfileNames = { "ECO", "INTERACTIVE", "REALTIME" }; return refreshRateProfileNames; } diff --git a/interface/src/scripting/PerformanceScriptingInterface.h b/interface/src/scripting/PerformanceScriptingInterface.h index c416b23b56..bf76261691 100644 --- a/interface/src/scripting/PerformanceScriptingInterface.h +++ b/interface/src/scripting/PerformanceScriptingInterface.h @@ -24,10 +24,10 @@ public: // PerformanceManager PerformancePreset tri state level enums enum PerformancePreset { + UNKNOWN = PerformanceManager::PerformancePreset::UNKNOWN, LOW = PerformanceManager::PerformancePreset::LOW, MID = PerformanceManager::PerformancePreset::MID, HIGH = PerformanceManager::PerformancePreset::HIGH, - UNKNOWN = PerformanceManager::PerformancePreset::UNKNOWN, }; Q_ENUM(PerformancePreset) diff --git a/interface/src/scripting/PlatformInfoScriptingInterface.h b/interface/src/scripting/PlatformInfoScriptingInterface.h index 0ca9dbff1a..476c5c5788 100644 --- a/interface/src/scripting/PlatformInfoScriptingInterface.h +++ b/interface/src/scripting/PlatformInfoScriptingInterface.h @@ -186,8 +186,8 @@ public slots: /**jsdoc * Get the Platform TIer profiled on startup of the Computer - * Platform Tier is an ineger/enum value: - * LOW = 0, MID = 1, HIGH = 2 + * Platform Tier is an integer/enum value: + * UNKNOWN = 0, LOW = 1, MID = 2, HIGH = 3 * @function PlatformInfo.getTierProfiled * @returns {number} The Platform Tier profiled on startup. */ @@ -195,8 +195,8 @@ public slots: /**jsdoc * Get the Platform Tier possible Names as an array of strings - * Platform Tier is an ineger/enum value: - * LOW = 0, MID = 1, HIGH = 2 + * Platform Tier names are: + * [ "UNKNOWN", "LOW", "MID", "HIGH" ] * @function PlatformInfo.getPlatformTierNames * @returns {string} The array of names matching the number returned from PlatformInfo.getTierProfiled */ diff --git a/interface/src/scripting/RenderScriptingInterface.cpp b/interface/src/scripting/RenderScriptingInterface.cpp index 085606179d..3d761a2bb7 100644 --- a/interface/src/scripting/RenderScriptingInterface.cpp +++ b/interface/src/scripting/RenderScriptingInterface.cpp @@ -10,8 +10,6 @@ #include "LightingModel.h" #include "AntialiasingEffect.h" -const QString DEFERRED = "deferred"; -const QString FORWARD = "forward"; RenderScriptingInterface* RenderScriptingInterface::getInstance() { static RenderScriptingInterface sharedInstance; @@ -45,11 +43,12 @@ void RenderScriptingInterface::setRenderMethod(RenderScriptingInterface::RenderM _renderMethodSetting.set(newMethod); config->setBranch(newMethod); emit config->dirtyEnabled(); + emit settingsChanged(); } } QStringList RenderScriptingInterface::getRenderMethodNames() const { - static const QStringList refrenderMethodNames = { "Deferred", "Forward" }; + static const QStringList refrenderMethodNames = { "DEFERRED", "FORWARD" }; return refrenderMethodNames; } @@ -72,6 +71,7 @@ void RenderScriptingInterface::setShadowsEnabled(bool enabled) { Menu::getInstance()->setIsOptionChecked(MenuOption::Shadows, enabled); _shadowsEnabledSetting.set(enabled); lightingModelConfig->setShadow(enabled); + emit settingsChanged(); } } @@ -94,6 +94,7 @@ void RenderScriptingInterface::setAmbientOcclusionEnabled(bool enabled) { Menu::getInstance()->setIsOptionChecked(MenuOption::AmbientOcclusion, enabled); _ambientOcclusionEnabledSetting.set(enabled); lightingModelConfig->setAmbientOcclusion(enabled); + emit settingsChanged(); } } @@ -123,5 +124,7 @@ void RenderScriptingInterface::setAntialiasingEnabled(bool enabled) { mainViewJitterCamConfig->none(); mainViewAntialiasingConfig->setDebugFXAA(true); } + + emit settingsChanged(); } } diff --git a/interface/src/scripting/RenderScriptingInterface.h b/interface/src/scripting/RenderScriptingInterface.h index 16608a7cb4..e2ae8bbff5 100644 --- a/interface/src/scripting/RenderScriptingInterface.h +++ b/interface/src/scripting/RenderScriptingInterface.h @@ -25,10 +25,10 @@ */ class RenderScriptingInterface : public QObject { Q_OBJECT - Q_PROPERTY(RenderMethod renderMethod READ getRenderMethod WRITE setRenderMethod) - Q_PROPERTY(bool shadowsEnabled READ getShadowsEnabled WRITE setShadowsEnabled) - Q_PROPERTY(bool ambientOcclusionEnabled READ getAmbientOcclusionEnabled WRITE setAmbientOcclusionEnabled) - Q_PROPERTY(bool antialiasingEnabled READ getAntialiasingEnabled WRITE setAntialiasingEnabled) + Q_PROPERTY(RenderMethod renderMethod READ getRenderMethod WRITE setRenderMethod NOTIFY settingsChanged) + Q_PROPERTY(bool shadowsEnabled READ getShadowsEnabled WRITE setShadowsEnabled NOTIFY settingsChanged) + Q_PROPERTY(bool ambientOcclusionEnabled READ getAmbientOcclusionEnabled WRITE setAmbientOcclusionEnabled NOTIFY settingsChanged) + Q_PROPERTY(bool antialiasingEnabled READ getAntialiasingEnabled WRITE setAntialiasingEnabled NOTIFY settingsChanged) public: RenderScriptingInterface(); @@ -132,6 +132,9 @@ public slots: */ // void setViewportResolutionScale(float resolutionScale); +signals: + void settingsChanged(); + private: Setting::Handle _renderMethodSetting { "renderMethod", RENDER_FORWARD ? render::Args::RenderMethod::FORWARD : render::Args::RenderMethod::DEFERRED }; Setting::Handle _shadowsEnabledSetting { "shadowsEnabled", true };