Updating the bloom debug ui

This commit is contained in:
Sam Gateau 2019-08-16 17:34:16 -07:00
parent b0b406adda
commit a934b79321
5 changed files with 54 additions and 91 deletions

View file

@ -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
}
}
}
}
}

View file

@ -10,11 +10,8 @@
// //
// Set up the qml ui // Set up the qml ui
var qml = Script.resolvePath('bloom.qml'); var window = Desktop.createWindow(Script.resolvePath('./luci/Bloom.qml'), {
var window = new OverlayWindow({ title: "Bloom",
title: 'Bloom', presentationMode: Desktop.PresentationMode.NATIVE,
source: qml, size: {x: 285, y: 40}
width: 285,
height: 40,
}); });
window.closed.connect(function() { Script.stop(); });

View file

@ -72,6 +72,12 @@ Rectangle {
Antialiasing {} Antialiasing {}
} }
} }
Prop.PropFolderPanel {
label: "Bloom"
panelFrameData: Component {
Bloom {}
}
}
Prop.PropFolderPanel { Prop.PropFolderPanel {
label: "Culling" label: "Culling"
panelFrameData: Component { panelFrameData: Component {

View 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) }
}
}

View file

@ -5,6 +5,7 @@ BoundingBoxes 1.0 BoundingBoxes.qml
Framebuffer 1.0 Framebuffer.qml Framebuffer 1.0 Framebuffer.qml
Antialiasing 1.0 Antialiasing.qml Antialiasing 1.0 Antialiasing.qml
Culling 1.0 Culling.qml Culling 1.0 Culling.qml
Bloom 1.0 Bloom.qml
Platform 1.0 Platform.qml Platform 1.0 Platform.qml
RenderSettings 1.0 RenderSettings.qml RenderSettings 1.0 RenderSettings.qml