Restore Launcher renderer settings to pre-Compositor state
This commit is contained in:
parent
627fd24fc1
commit
b0a64e119a
2 changed files with 10 additions and 38 deletions
|
@ -125,8 +125,6 @@ LauncherMainWindow::LauncherMainWindow(bool inSimMode) : QQuickView()
|
||||||
ctx->setContextProperty("_addOns", addOnsCtl);
|
ctx->setContextProperty("_addOns", addOnsCtl);
|
||||||
}
|
}
|
||||||
|
|
||||||
ctx->setContextProperty("_haveCompositor", true);
|
|
||||||
|
|
||||||
auto weatherScenariosModel = new flightgear::WeatherScenariosModel(this);
|
auto weatherScenariosModel = new flightgear::WeatherScenariosModel(this);
|
||||||
ctx->setContextProperty("_weatherScenarios", weatherScenariosModel);
|
ctx->setContextProperty("_weatherScenarios", weatherScenariosModel);
|
||||||
|
|
||||||
|
|
|
@ -427,63 +427,46 @@ Item {
|
||||||
width: parent.width
|
width: parent.width
|
||||||
settingGroup: "render"
|
settingGroup: "render"
|
||||||
|
|
||||||
readonly property bool rembrandt: !_haveCompositor && (renderer.selectedIndex == 2)
|
|
||||||
readonly property bool alsEnabled: (renderer.selectedIndex == 1)
|
readonly property bool alsEnabled: (renderer.selectedIndex == 1)
|
||||||
readonly property bool msaaEnabled: !rembrandt && (msaa.selectedIndex > 0)
|
readonly property bool msaaEnabled: (msaa.selectedIndex > 0)
|
||||||
|
|
||||||
function summary()
|
function summary()
|
||||||
{
|
{
|
||||||
var result = [];
|
var result = [];
|
||||||
if (rembrandt) result.push(qsTr("Rembrandt"));
|
if (alsEnabled) result.push(qsTr("ALS"));
|
||||||
else if (alsEnabled) result.push(qsTr("ALS"));
|
|
||||||
if (msaaEnabled) result.push(qsTr("anti-aliasing"));
|
if (msaaEnabled) result.push(qsTr("anti-aliasing"));
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
readonly property var __traditionalRendererChoices: [qsTr("Default"),
|
readonly property var __rendererChoices: [qsTr("Default"),
|
||||||
qsTr("Atmospheric Light Scattering"),
|
qsTr("Atmospheric Light Scattering")]
|
||||||
qsTr("Rembrandt")]
|
|
||||||
|
|
||||||
readonly property var __compositorRendererChoices: [qsTr("Default"),
|
|
||||||
qsTr("Atmospheric Light Scattering"),
|
|
||||||
qsTr("Low-spec")]
|
|
||||||
|
|
||||||
readonly property string __defaultRenderDesc: qsTr("The default renderer provides standard visuals with maximum compatibility.")
|
readonly property string __defaultRenderDesc: qsTr("The default renderer provides standard visuals with maximum compatibility.")
|
||||||
readonly property string __alsRenderDesc: qsTr("The ALS renderer uses a sophisticated physical atmospheric model and several " +
|
readonly property string __alsRenderDesc: qsTr("The ALS renderer uses a sophisticated physical atmospheric model and several " +
|
||||||
"other effects to give realistic rendering of large distances.")
|
"other effects to give realistic rendering of large distances.")
|
||||||
readonly property string __rembrandtDesc: qsTr("Rembrandt is a configurable multi-pass renderer which supports shadow-maps, cinematic " +
|
|
||||||
"effects and more. However, not all aircraft appear correctly and performance will " +
|
|
||||||
"depend greatly on your system hardware.")
|
|
||||||
readonly property string __lowSpecDesc: qsTr("The low-spec renderer ensures maximum performance on older computers.")
|
|
||||||
|
|
||||||
readonly property var descriptions: _haveCompositor
|
readonly property var descriptions: [__defaultRenderDesc, __alsRenderDesc]
|
||||||
? [__defaultRenderDesc, __alsRenderDesc, __lowSpecDesc]
|
|
||||||
: [__defaultRenderDesc, __alsRenderDesc, __rembrandtDesc]
|
|
||||||
|
|
||||||
contents: [
|
contents: [
|
||||||
SettingsComboBox {
|
SettingsComboBox {
|
||||||
id: renderer
|
id: renderer
|
||||||
label: qsTr("Renderer")
|
label: qsTr("Renderer")
|
||||||
choices: _haveCompositor
|
choices: renderSection.__rendererChoices
|
||||||
? renderSection.__compositorRendererChoices
|
|
||||||
: renderSection.__traditionalRendererChoices
|
|
||||||
description: renderSection.descriptions[selectedIndex]
|
description: renderSection.descriptions[selectedIndex]
|
||||||
defaultIndex: 1
|
defaultIndex: 1
|
||||||
setting: "renderer"
|
setting: "renderer"
|
||||||
keywords: ["als", "rembrandt", "render", "shadow", "low-spec", "graphics", "performance"]
|
keywords: ["als", "render", "shadow", "low-spec", "graphics", "performance"]
|
||||||
},
|
},
|
||||||
|
|
||||||
SettingsComboBox {
|
SettingsComboBox {
|
||||||
id: msaa
|
id: msaa
|
||||||
label: qsTr("Anti-aliasing")
|
label: qsTr("Anti-aliasing")
|
||||||
setting: "aa"
|
setting: "aa"
|
||||||
description: renderSection.rembrandt? qsTr("Anti-aliasing is disabled when Rembrandt is enabled.")
|
description: qsTr("Anti-aliasing improves the appearance of high-contrast edges and lines. " +
|
||||||
: qsTr("Anti-aliasing improves the appearance of high-contrast edges and lines. " +
|
|
||||||
"This is especially noticeable on sloping or diagonal edges. " +
|
"This is especially noticeable on sloping or diagonal edges. " +
|
||||||
"Higher settings can reduce performance.")
|
"Higher settings can reduce performance.")
|
||||||
keywords: ["msaa", "anti", "aliasing", "multi", "sample"]
|
keywords: ["msaa", "anti", "aliasing", "multi", "sample"]
|
||||||
choices: [qsTr("Off"), "2x", "4x"]
|
choices: [qsTr("Off"), "2x", "4x"]
|
||||||
enabled: !renderSection.rembrandt
|
|
||||||
property var data: [0, 2, 4];
|
property var data: [0, 2, 4];
|
||||||
defaultIndex: 0
|
defaultIndex: 0
|
||||||
},
|
},
|
||||||
|
@ -510,17 +493,8 @@ Item {
|
||||||
_config.setProperty("/sim/rendering/multi-samples", msaa.data[msaa.selectedIndex])
|
_config.setProperty("/sim/rendering/multi-samples", msaa.data[msaa.selectedIndex])
|
||||||
}
|
}
|
||||||
|
|
||||||
if (_haveCompositor) {
|
if (alsEnabled) {
|
||||||
if (alsEnabled) {
|
_config.setProperty("/sim/rendering/shaders/skydome", true);
|
||||||
_config.setArg("compositor", "Compositor/als");
|
|
||||||
} else if (renderer.selectedIndex == 2) {
|
|
||||||
_config.setArg("compositor", "Compositor/low-spec")
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
_config.setEnableDisableOption("rembrandt", rembrandt);
|
|
||||||
if (alsEnabled) {
|
|
||||||
_config.setProperty("/sim/rendering/shaders/skydome", true);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
_config.setProperty("/sim/rendering/texture-cache/cache-enabled", compressTextures.value);
|
_config.setProperty("/sim/rendering/texture-cache/cache-enabled", compressTextures.value);
|
||||||
|
|
Loading…
Add table
Reference in a new issue