mirror of
https://github.com/overte-org/overte.git
synced 2025-08-09 05:58:27 +02:00
cleaning up case of enum names and aligning the PerformancePreset with the PlatformTier
This commit is contained in:
parent
916ff31cf6
commit
4e2480d032
5 changed files with 20 additions and 14 deletions
|
@ -28,7 +28,7 @@ PerformanceScriptingInterface::PerformancePreset PerformanceScriptingInterface::
|
||||||
}
|
}
|
||||||
|
|
||||||
QStringList PerformanceScriptingInterface::getPerformancePresetNames() const {
|
QStringList PerformanceScriptingInterface::getPerformancePresetNames() const {
|
||||||
static const QStringList performancePresetNames = { "Unknown", "Low", "Mid", "High" };
|
static const QStringList performancePresetNames = { "UNKNOWN", "LOW", "MID", "HIGH" };
|
||||||
return performancePresetNames;
|
return performancePresetNames;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -41,7 +41,7 @@ PerformanceScriptingInterface::RefreshRateProfile PerformanceScriptingInterface:
|
||||||
}
|
}
|
||||||
|
|
||||||
QStringList PerformanceScriptingInterface::getRefreshRateProfileNames() const {
|
QStringList PerformanceScriptingInterface::getRefreshRateProfileNames() const {
|
||||||
static const QStringList refreshRateProfileNames = { "Eco", "Interactive", "Realtime" };
|
static const QStringList refreshRateProfileNames = { "ECO", "INTERACTIVE", "REALTIME" };
|
||||||
return refreshRateProfileNames;
|
return refreshRateProfileNames;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -24,10 +24,10 @@ public:
|
||||||
|
|
||||||
// PerformanceManager PerformancePreset tri state level enums
|
// PerformanceManager PerformancePreset tri state level enums
|
||||||
enum PerformancePreset {
|
enum PerformancePreset {
|
||||||
|
UNKNOWN = PerformanceManager::PerformancePreset::UNKNOWN,
|
||||||
LOW = PerformanceManager::PerformancePreset::LOW,
|
LOW = PerformanceManager::PerformancePreset::LOW,
|
||||||
MID = PerformanceManager::PerformancePreset::MID,
|
MID = PerformanceManager::PerformancePreset::MID,
|
||||||
HIGH = PerformanceManager::PerformancePreset::HIGH,
|
HIGH = PerformanceManager::PerformancePreset::HIGH,
|
||||||
UNKNOWN = PerformanceManager::PerformancePreset::UNKNOWN,
|
|
||||||
};
|
};
|
||||||
Q_ENUM(PerformancePreset)
|
Q_ENUM(PerformancePreset)
|
||||||
|
|
||||||
|
|
|
@ -186,8 +186,8 @@ public slots:
|
||||||
|
|
||||||
/**jsdoc
|
/**jsdoc
|
||||||
* Get the Platform TIer profiled on startup of the Computer
|
* Get the Platform TIer profiled on startup of the Computer
|
||||||
* Platform Tier is an ineger/enum value:
|
* Platform Tier is an integer/enum value:
|
||||||
* LOW = 0, MID = 1, HIGH = 2
|
* UNKNOWN = 0, LOW = 1, MID = 2, HIGH = 3
|
||||||
* @function PlatformInfo.getTierProfiled
|
* @function PlatformInfo.getTierProfiled
|
||||||
* @returns {number} The Platform Tier profiled on startup.
|
* @returns {number} The Platform Tier profiled on startup.
|
||||||
*/
|
*/
|
||||||
|
@ -195,8 +195,8 @@ public slots:
|
||||||
|
|
||||||
/**jsdoc
|
/**jsdoc
|
||||||
* Get the Platform Tier possible Names as an array of strings
|
* Get the Platform Tier possible Names as an array of strings
|
||||||
* Platform Tier is an ineger/enum value:
|
* Platform Tier names are:
|
||||||
* LOW = 0, MID = 1, HIGH = 2
|
* [ "UNKNOWN", "LOW", "MID", "HIGH" ]
|
||||||
* @function PlatformInfo.getPlatformTierNames
|
* @function PlatformInfo.getPlatformTierNames
|
||||||
* @returns {string} The array of names matching the number returned from PlatformInfo.getTierProfiled
|
* @returns {string} The array of names matching the number returned from PlatformInfo.getTierProfiled
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -10,8 +10,6 @@
|
||||||
#include "LightingModel.h"
|
#include "LightingModel.h"
|
||||||
#include "AntialiasingEffect.h"
|
#include "AntialiasingEffect.h"
|
||||||
|
|
||||||
const QString DEFERRED = "deferred";
|
|
||||||
const QString FORWARD = "forward";
|
|
||||||
|
|
||||||
RenderScriptingInterface* RenderScriptingInterface::getInstance() {
|
RenderScriptingInterface* RenderScriptingInterface::getInstance() {
|
||||||
static RenderScriptingInterface sharedInstance;
|
static RenderScriptingInterface sharedInstance;
|
||||||
|
@ -45,11 +43,12 @@ void RenderScriptingInterface::setRenderMethod(RenderScriptingInterface::RenderM
|
||||||
_renderMethodSetting.set(newMethod);
|
_renderMethodSetting.set(newMethod);
|
||||||
config->setBranch(newMethod);
|
config->setBranch(newMethod);
|
||||||
emit config->dirtyEnabled();
|
emit config->dirtyEnabled();
|
||||||
|
emit settingsChanged();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
QStringList RenderScriptingInterface::getRenderMethodNames() const {
|
QStringList RenderScriptingInterface::getRenderMethodNames() const {
|
||||||
static const QStringList refrenderMethodNames = { "Deferred", "Forward" };
|
static const QStringList refrenderMethodNames = { "DEFERRED", "FORWARD" };
|
||||||
return refrenderMethodNames;
|
return refrenderMethodNames;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -72,6 +71,7 @@ void RenderScriptingInterface::setShadowsEnabled(bool enabled) {
|
||||||
Menu::getInstance()->setIsOptionChecked(MenuOption::Shadows, enabled);
|
Menu::getInstance()->setIsOptionChecked(MenuOption::Shadows, enabled);
|
||||||
_shadowsEnabledSetting.set(enabled);
|
_shadowsEnabledSetting.set(enabled);
|
||||||
lightingModelConfig->setShadow(enabled);
|
lightingModelConfig->setShadow(enabled);
|
||||||
|
emit settingsChanged();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -94,6 +94,7 @@ void RenderScriptingInterface::setAmbientOcclusionEnabled(bool enabled) {
|
||||||
Menu::getInstance()->setIsOptionChecked(MenuOption::AmbientOcclusion, enabled);
|
Menu::getInstance()->setIsOptionChecked(MenuOption::AmbientOcclusion, enabled);
|
||||||
_ambientOcclusionEnabledSetting.set(enabled);
|
_ambientOcclusionEnabledSetting.set(enabled);
|
||||||
lightingModelConfig->setAmbientOcclusion(enabled);
|
lightingModelConfig->setAmbientOcclusion(enabled);
|
||||||
|
emit settingsChanged();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -123,5 +124,7 @@ void RenderScriptingInterface::setAntialiasingEnabled(bool enabled) {
|
||||||
mainViewJitterCamConfig->none();
|
mainViewJitterCamConfig->none();
|
||||||
mainViewAntialiasingConfig->setDebugFXAA(true);
|
mainViewAntialiasingConfig->setDebugFXAA(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
emit settingsChanged();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -25,10 +25,10 @@
|
||||||
*/
|
*/
|
||||||
class RenderScriptingInterface : public QObject {
|
class RenderScriptingInterface : public QObject {
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
Q_PROPERTY(RenderMethod renderMethod READ getRenderMethod WRITE setRenderMethod)
|
Q_PROPERTY(RenderMethod renderMethod READ getRenderMethod WRITE setRenderMethod NOTIFY settingsChanged)
|
||||||
Q_PROPERTY(bool shadowsEnabled READ getShadowsEnabled WRITE setShadowsEnabled)
|
Q_PROPERTY(bool shadowsEnabled READ getShadowsEnabled WRITE setShadowsEnabled NOTIFY settingsChanged)
|
||||||
Q_PROPERTY(bool ambientOcclusionEnabled READ getAmbientOcclusionEnabled WRITE setAmbientOcclusionEnabled)
|
Q_PROPERTY(bool ambientOcclusionEnabled READ getAmbientOcclusionEnabled WRITE setAmbientOcclusionEnabled NOTIFY settingsChanged)
|
||||||
Q_PROPERTY(bool antialiasingEnabled READ getAntialiasingEnabled WRITE setAntialiasingEnabled)
|
Q_PROPERTY(bool antialiasingEnabled READ getAntialiasingEnabled WRITE setAntialiasingEnabled NOTIFY settingsChanged)
|
||||||
|
|
||||||
public:
|
public:
|
||||||
RenderScriptingInterface();
|
RenderScriptingInterface();
|
||||||
|
@ -132,6 +132,9 @@ public slots:
|
||||||
*/
|
*/
|
||||||
// void setViewportResolutionScale(float resolutionScale);
|
// void setViewportResolutionScale(float resolutionScale);
|
||||||
|
|
||||||
|
signals:
|
||||||
|
void settingsChanged();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
Setting::Handle<int> _renderMethodSetting { "renderMethod", RENDER_FORWARD ? render::Args::RenderMethod::FORWARD : render::Args::RenderMethod::DEFERRED };
|
Setting::Handle<int> _renderMethodSetting { "renderMethod", RENDER_FORWARD ? render::Args::RenderMethod::FORWARD : render::Args::RenderMethod::DEFERRED };
|
||||||
Setting::Handle<bool> _shadowsEnabledSetting { "shadowsEnabled", true };
|
Setting::Handle<bool> _shadowsEnabledSetting { "shadowsEnabled", true };
|
||||||
|
|
Loading…
Reference in a new issue