mirror of
https://github.com/Armored-Dragon/overte.git
synced 2025-03-11 16:13:16 +01:00
Updating the bloom debug ui
This commit is contained in:
parent
b0b406adda
commit
a934b79321
5 changed files with 54 additions and 91 deletions
|
@ -1,83 +0,0 @@
|
|||
//
|
||||
// bloom.qml
|
||||
// developer/utilities/render
|
||||
//
|
||||
// Olivier Prat, created on 09/25/2017.
|
||||
// Copyright 2017 High Fidelity, Inc.
|
||||
//
|
||||
// Distributed under the Apache License, Version 2.0.
|
||||
// See the accompanying file LICENSE or https://www.apache.org/licenses/LICENSE-2.0.html
|
||||
//
|
||||
import QtQuick 2.5
|
||||
import QtQuick.Controls 1.4
|
||||
import "configSlider"
|
||||
|
||||
Item {
|
||||
id: root
|
||||
property var configDebug: Render.getConfig("RenderMainView.DebugBloom")
|
||||
|
||||
Column {
|
||||
spacing: 8
|
||||
|
||||
GroupBox {
|
||||
title: "Debug"
|
||||
Row {
|
||||
ExclusiveGroup { id: debugGroup }
|
||||
RadioButton {
|
||||
text : "Off"
|
||||
checked : !root.configDebug["enabled"]
|
||||
onCheckedChanged: {
|
||||
if (checked) {
|
||||
root.configDebug["enabled"] = false
|
||||
}
|
||||
}
|
||||
exclusiveGroup : debugGroup
|
||||
}
|
||||
RadioButton {
|
||||
text : "Lvl 0"
|
||||
checked :root.configDebug["enabled"] && root.configDebug["mode"]==0
|
||||
onCheckedChanged: {
|
||||
if (checked) {
|
||||
root.configDebug["enabled"] = true
|
||||
root.configDebug["mode"] = 0
|
||||
}
|
||||
}
|
||||
exclusiveGroup : debugGroup
|
||||
}
|
||||
RadioButton {
|
||||
text : "Lvl 1"
|
||||
checked : root.configDebug["enabled"] && root.configDebug["mode"]==1
|
||||
onCheckedChanged: {
|
||||
if (checked) {
|
||||
root.configDebug["enabled"] = true
|
||||
root.configDebug["mode"] = 1
|
||||
}
|
||||
}
|
||||
exclusiveGroup : debugGroup
|
||||
}
|
||||
RadioButton {
|
||||
text : "Lvl 2"
|
||||
checked : root.configDebug["enabled"] && root.configDebug["mode"]==2
|
||||
onCheckedChanged: {
|
||||
if (checked) {
|
||||
root.configDebug["enabled"] = true
|
||||
root.configDebug["mode"] = 2
|
||||
}
|
||||
}
|
||||
exclusiveGroup : debugGroup
|
||||
}
|
||||
RadioButton {
|
||||
text : "All"
|
||||
checked : root.configDebug["enabled"] && root.configDebug["mode"]==3
|
||||
onCheckedChanged: {
|
||||
if (checked) {
|
||||
root.configDebug["enabled"] = true
|
||||
root.configDebug["mode"] = 3
|
||||
}
|
||||
}
|
||||
exclusiveGroup : debugGroup
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -10,11 +10,8 @@
|
|||
//
|
||||
|
||||
// Set up the qml ui
|
||||
var qml = Script.resolvePath('bloom.qml');
|
||||
var window = new OverlayWindow({
|
||||
title: 'Bloom',
|
||||
source: qml,
|
||||
width: 285,
|
||||
height: 40,
|
||||
});
|
||||
window.closed.connect(function() { Script.stop(); });
|
||||
var window = Desktop.createWindow(Script.resolvePath('./luci/Bloom.qml'), {
|
||||
title: "Bloom",
|
||||
presentationMode: Desktop.PresentationMode.NATIVE,
|
||||
size: {x: 285, y: 40}
|
||||
});
|
|
@ -72,6 +72,12 @@ Rectangle {
|
|||
Antialiasing {}
|
||||
}
|
||||
}
|
||||
Prop.PropFolderPanel {
|
||||
label: "Bloom"
|
||||
panelFrameData: Component {
|
||||
Bloom {}
|
||||
}
|
||||
}
|
||||
Prop.PropFolderPanel {
|
||||
label: "Culling"
|
||||
panelFrameData: Component {
|
||||
|
|
42
scripts/developer/utilities/render/luci/Bloom.qml
Normal file
42
scripts/developer/utilities/render/luci/Bloom.qml
Normal file
|
@ -0,0 +1,42 @@
|
|||
//
|
||||
// bloom.qml
|
||||
//
|
||||
// Olivier Prat, created on 09/25/2017.
|
||||
// Copyright 2017 High Fidelity, Inc.
|
||||
//
|
||||
// Distributed under the Apache License, Version 2.0.
|
||||
// See the accompanying file LICENSE or https://www.apache.org/licenses/LICENSE-2.0.html
|
||||
//
|
||||
import QtQuick 2.7
|
||||
import "../../lib/prop" as Prop
|
||||
|
||||
Column {
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
|
||||
id: bloom
|
||||
|
||||
property var config: Render.getConfig("RenderMainView.DebugBloom")
|
||||
|
||||
function setDebugMode(mode) {
|
||||
bloom.config.enabled = (mode != 0);
|
||||
bloom.config.mode = mode;
|
||||
}
|
||||
|
||||
Prop.PropEnum {
|
||||
label: "Debug Bloom Buffer"
|
||||
object: config
|
||||
property: "mode"
|
||||
// valueVar: 0
|
||||
enums: [
|
||||
"Off",
|
||||
"Lvl 0",
|
||||
"Lvl 1",
|
||||
"Lvl 2",
|
||||
"All",
|
||||
]
|
||||
|
||||
valueVarSetter: function (mode) { bloom.setDebugMode(mode) }
|
||||
}
|
||||
}
|
||||
|
|
@ -5,6 +5,7 @@ BoundingBoxes 1.0 BoundingBoxes.qml
|
|||
Framebuffer 1.0 Framebuffer.qml
|
||||
Antialiasing 1.0 Antialiasing.qml
|
||||
Culling 1.0 Culling.qml
|
||||
Bloom 1.0 Bloom.qml
|
||||
|
||||
Platform 1.0 Platform.qml
|
||||
RenderSettings 1.0 RenderSettings.qml
|
||||
|
|
Loading…
Reference in a new issue