mirror of
https://github.com/AleziaKurdis/overte.git
synced 2025-04-07 04:53:28 +02:00
Gathering all the needed settings in one place
This commit is contained in:
parent
0862e40b41
commit
aedc631c45
5 changed files with 29 additions and 5 deletions
|
@ -27,6 +27,11 @@ PerformanceScriptingInterface::RefreshRateProfile PerformanceScriptingInterface:
|
|||
return (PerformanceScriptingInterface::RefreshRateProfile)qApp->getRefreshRateManager().getRefreshRateProfile();
|
||||
}
|
||||
|
||||
QStringList PerformanceScriptingInterface::getRefreshRateProfileNames() const {
|
||||
static const QStringList refreshRateProfileNames = { "Eco", "Interactive", "Realtime" };
|
||||
return refreshRateProfileNames;
|
||||
}
|
||||
|
||||
int PerformanceScriptingInterface::getActiveRefreshRate() const {
|
||||
return qApp->getRefreshRateManager().getActiveRefreshRate();
|
||||
}
|
||||
|
|
|
@ -33,14 +33,15 @@ public:
|
|||
~PerformanceScriptingInterface() = default;
|
||||
|
||||
public slots:
|
||||
|
||||
void setRefreshRateProfile(RefreshRateProfile refreshRateProfile);
|
||||
RefreshRateProfile getRefreshRateProfile() const;
|
||||
QStringList getRefreshRateProfileNames() const;
|
||||
|
||||
int getActiveRefreshRate() const;
|
||||
RefreshRateManager::UXMode getUXMode() const;
|
||||
RefreshRateManager::RefreshRateRegime getRefreshRateRegime() const;
|
||||
|
||||
|
||||
private:
|
||||
static std::once_flag registry_flag;
|
||||
};
|
||||
|
|
|
@ -48,6 +48,11 @@ void RenderScriptingInterface::setRenderMethod(RenderScriptingInterface::RenderM
|
|||
}
|
||||
}
|
||||
|
||||
QStringList RenderScriptingInterface::getRenderMethodNames() const {
|
||||
static const QStringList refrenderMethodNames = { "Deferred", "Forward" };
|
||||
return refrenderMethodNames;
|
||||
}
|
||||
|
||||
bool RenderScriptingInterface::getShadowsEnabled() {
|
||||
return _shadowsEnabledSetting.get();
|
||||
}
|
||||
|
|
|
@ -68,6 +68,14 @@ public slots:
|
|||
*/
|
||||
void setRenderMethod(RenderMethod renderMethod);
|
||||
|
||||
/**jsdoc
|
||||
* Gets the possible enum names of the RenderMethod type
|
||||
* @function Render.getRenderMethodNames
|
||||
* @returns [string] [ <code>"DEFERRED"</code>, <code>"FORWARD"</code> ]
|
||||
*/
|
||||
QStringList getRenderMethodNames() const;
|
||||
|
||||
|
||||
/**jsdoc
|
||||
* Whether or not shadows are enabled
|
||||
* @function Render.getShadowsEnabled
|
||||
|
|
|
@ -19,14 +19,19 @@ Column {
|
|||
anchors.fill: parent
|
||||
id: theGrapchicsSettings;
|
||||
|
||||
Prop.PropEnum {
|
||||
label: "Refresh Rate Profile"
|
||||
//object: Performance
|
||||
valueVarSetter: Performance.setRefreshRateProfile
|
||||
valueVarGetter: Performance.getRefreshRateProfile
|
||||
enums: Performance.getRefreshRateProfileNames()
|
||||
}
|
||||
|
||||
Prop.PropEnum {
|
||||
label: "Render Method"
|
||||
object: Render
|
||||
property: "renderMethod"
|
||||
enums: [
|
||||
"Deferred",
|
||||
"Forward"
|
||||
]
|
||||
enums: Render.getRenderMethodNames()
|
||||
}
|
||||
|
||||
Prop.PropBool {
|
||||
|
|
Loading…
Reference in a new issue