mirror of
https://github.com/overte-org/overte.git
synced 2025-08-06 23:09:52 +02:00
Fixing the scripts and investigating the scripting
This commit is contained in:
parent
3727b2af7e
commit
d853a76376
12 changed files with 56 additions and 139 deletions
|
@ -1874,7 +1874,7 @@ void Application::initializeGL() {
|
||||||
render::CullFunctor cullFunctor = LODManager::shouldRender;
|
render::CullFunctor cullFunctor = LODManager::shouldRender;
|
||||||
static const QString RENDER_FORWARD = "HIFI_RENDER_FORWARD";
|
static const QString RENDER_FORWARD = "HIFI_RENDER_FORWARD";
|
||||||
bool isDeferred = !QProcessEnvironment::systemEnvironment().contains(RENDER_FORWARD);
|
bool isDeferred = !QProcessEnvironment::systemEnvironment().contains(RENDER_FORWARD);
|
||||||
_renderEngine->addJob<SecondaryCameraRenderTask>("SecondaryCameraFrame", cullFunctor);
|
// _renderEngine->addJob<SecondaryCameraRenderTask>("SecondaryCameraFrame", cullFunctor);
|
||||||
_renderEngine->addJob<RenderViewTask>("RenderMainView", cullFunctor, isDeferred);
|
_renderEngine->addJob<RenderViewTask>("RenderMainView", cullFunctor, isDeferred);
|
||||||
_renderEngine->load();
|
_renderEngine->load();
|
||||||
_renderEngine->registerScene(_main3DScene);
|
_renderEngine->registerScene(_main3DScene);
|
||||||
|
|
|
@ -63,4 +63,6 @@ void EngineStats::run(const RenderContextPointer& renderContext) {
|
||||||
|
|
||||||
config->frameSetPipelineCount = _gpuStats._PSNumSetPipelines;
|
config->frameSetPipelineCount = _gpuStats._PSNumSetPipelines;
|
||||||
config->frameSetInputFormatCount = _gpuStats._ISNumFormatChanges;
|
config->frameSetInputFormatCount = _gpuStats._ISNumFormatChanges;
|
||||||
|
|
||||||
|
config->emitDirty();
|
||||||
}
|
}
|
||||||
|
|
|
@ -1006,6 +1006,7 @@ void ScriptEngine::run() {
|
||||||
emit runningStateChanged();
|
emit runningStateChanged();
|
||||||
|
|
||||||
{
|
{
|
||||||
|
PROFILE_RANGE(script, _fileNameString);
|
||||||
evaluate(_scriptContents, _fileNameString);
|
evaluate(_scriptContents, _fileNameString);
|
||||||
maybeEmitUncaughtException(__FUNCTION__);
|
maybeEmitUncaughtException(__FUNCTION__);
|
||||||
}
|
}
|
||||||
|
|
|
@ -49,11 +49,15 @@ Item {
|
||||||
|
|
||||||
property var valueMax : 1
|
property var valueMax : 1
|
||||||
|
|
||||||
property var _values : new Array()
|
property var _values
|
||||||
property var tick : 0
|
property var tick : 0
|
||||||
|
|
||||||
function createValues() {
|
function createValues() {
|
||||||
|
if (!_values) {
|
||||||
|
_values = new Array();
|
||||||
|
}
|
||||||
for (var i =0; i < plots.length; i++) {
|
for (var i =0; i < plots.length; i++) {
|
||||||
|
|
||||||
var plot = plots[i];
|
var plot = plots[i];
|
||||||
var object = plot["object"] || root.object;
|
var object = plot["object"] || root.object;
|
||||||
var value = plot["prop"];
|
var value = plot["prop"];
|
||||||
|
@ -80,6 +84,7 @@ Item {
|
||||||
|
|
||||||
Component.onCompleted: {
|
Component.onCompleted: {
|
||||||
createValues();
|
createValues();
|
||||||
|
console.log("PlotPerf plot values is", JSON.stringify(_values));
|
||||||
}
|
}
|
||||||
function resetMax() {
|
function resetMax() {
|
||||||
for (var i = 0; i < _values.length; i++) {
|
for (var i = 0; i < _values.length; i++) {
|
||||||
|
@ -93,7 +98,7 @@ Item {
|
||||||
|
|
||||||
var VALUE_HISTORY_SIZE = 100;
|
var VALUE_HISTORY_SIZE = 100;
|
||||||
tick++;
|
tick++;
|
||||||
|
|
||||||
var currentValueMax = 0
|
var currentValueMax = 0
|
||||||
for (var i = 0; i < _values.length; i++) {
|
for (var i = 0; i < _values.length; i++) {
|
||||||
|
|
||||||
|
@ -128,7 +133,6 @@ Item {
|
||||||
if ((valueMax < currentValueMax) || (tick % VALUE_HISTORY_SIZE == 0)) {
|
if ((valueMax < currentValueMax) || (tick % VALUE_HISTORY_SIZE == 0)) {
|
||||||
valueMax = currentValueMax;
|
valueMax = currentValueMax;
|
||||||
}
|
}
|
||||||
|
|
||||||
mycanvas.requestPaint()
|
mycanvas.requestPaint()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -13,7 +13,6 @@ import "configSlider"
|
||||||
import "../lib/plotperf"
|
import "../lib/plotperf"
|
||||||
|
|
||||||
Column {
|
Column {
|
||||||
property var mainViewTask: Render.getConfig("RenderMainView")
|
|
||||||
spacing: 8
|
spacing: 8
|
||||||
Column {
|
Column {
|
||||||
id: surfaceGeometry
|
id: surfaceGeometry
|
||||||
|
@ -33,7 +32,7 @@ Column {
|
||||||
ConfigSlider {
|
ConfigSlider {
|
||||||
label: qsTr(modelData.split(":")[0])
|
label: qsTr(modelData.split(":")[0])
|
||||||
integral: (modelData.split(":")[3] == 'true')
|
integral: (modelData.split(":")[3] == 'true')
|
||||||
config: mainViewTask.getConfig("AmbientOcclusion")
|
config: Render.getConfig("RenderMainView.AmbientOcclusion")
|
||||||
property: modelData.split(":")[1]
|
property: modelData.split(":")[1]
|
||||||
max: modelData.split(":")[2]
|
max: modelData.split(":")[2]
|
||||||
min: 0.0
|
min: 0.0
|
||||||
|
@ -51,8 +50,8 @@ Column {
|
||||||
]
|
]
|
||||||
CheckBox {
|
CheckBox {
|
||||||
text: qsTr(modelData.split(":")[0])
|
text: qsTr(modelData.split(":")[0])
|
||||||
checked: mainViewTask.getConfig("AmbientOcclusion")[modelData.split(":")[1]]
|
checked: Render.getConfig("RenderMainView.AmbientOcclusion")[modelData.split(":")[1]]
|
||||||
onCheckedChanged: { mainViewTask.getConfig("AmbientOcclusion")[modelData.split(":")[1]] = checked }
|
onCheckedChanged: { Render.getConfig("RenderMainView.AmbientOcclusion")[modelData.split(":")[1]] = checked }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -63,8 +62,8 @@ Column {
|
||||||
]
|
]
|
||||||
CheckBox {
|
CheckBox {
|
||||||
text: qsTr(modelData.split(":")[0])
|
text: qsTr(modelData.split(":")[0])
|
||||||
checked: mainViewTask.getConfig("DebugAmbientOcclusion")[modelData.split(":")[1]]
|
checked: Render.getConfig("RenderMainView.DebugAmbientOcclusion")[modelData.split(":")[1]]
|
||||||
onCheckedChanged: { mainViewTask.getConfig("DebugAmbientOcclusion")[modelData.split(":")[1]] = checked }
|
onCheckedChanged: { Render.getConfig("RenderMainView.DebugAmbientOcclusion")[modelData.split(":")[1]] = checked }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -73,7 +72,7 @@ Column {
|
||||||
PlotPerf {
|
PlotPerf {
|
||||||
title: "Timing"
|
title: "Timing"
|
||||||
height: 50
|
height: 50
|
||||||
object: mainViewTask.getConfig("AmbientOcclusion")
|
object: Render.getConfig("RenderMainView.AmbientOcclusion")
|
||||||
valueUnit: "ms"
|
valueUnit: "ms"
|
||||||
valueScale: 1
|
valueScale: 1
|
||||||
valueNumDigits: "3"
|
valueNumDigits: "3"
|
||||||
|
|
|
@ -13,7 +13,7 @@ var qml = Script.resolvePath('ambientOcclusionPass.qml');
|
||||||
var window = new OverlayWindow({
|
var window = new OverlayWindow({
|
||||||
title: 'Ambient Occlusion Pass',
|
title: 'Ambient Occlusion Pass',
|
||||||
source: qml,
|
source: qml,
|
||||||
width: 400, height: 250,
|
width: 400, height: 300,
|
||||||
});
|
});
|
||||||
window.setPosition(Window.innerWidth - 420, 50 + 550 + 50);
|
window.setPosition(Window.innerWidth - 420, 50 + 550 + 50);
|
||||||
window.closed.connect(function() { Script.stop(); });
|
window.closed.connect(function() { Script.stop(); });
|
||||||
|
|
|
@ -13,7 +13,7 @@ var qml = Script.resolvePath('deferredLighting.qml');
|
||||||
var window = new OverlayWindow({
|
var window = new OverlayWindow({
|
||||||
title: 'Lighting',
|
title: 'Lighting',
|
||||||
source: qml,
|
source: qml,
|
||||||
width: 400, height:350,
|
width: 400, height:400,
|
||||||
});
|
});
|
||||||
window.setPosition(Window.innerWidth - 420, 50);
|
window.setPosition(Window.innerWidth - 420, 50);
|
||||||
window.closed.connect(function() { Script.stop(); });
|
window.closed.connect(function() { Script.stop(); });
|
||||||
|
|
|
@ -15,7 +15,7 @@ var window = new OverlayWindow({
|
||||||
title: 'Light Clustering',
|
title: 'Light Clustering',
|
||||||
source: qml,
|
source: qml,
|
||||||
width: 400,
|
width: 400,
|
||||||
height: 300
|
height: 400
|
||||||
});
|
});
|
||||||
window.setPosition(Window.innerWidth - 420, 50 + 250 + 50 + 250 + 50 );
|
window.setPosition(Window.innerWidth - 420, 50 + 250 + 50 + 250 + 50 );
|
||||||
window.closed.connect(function() { Script.stop(); });
|
window.closed.connect(function() { Script.stop(); });
|
|
@ -17,19 +17,18 @@ Column {
|
||||||
Column {
|
Column {
|
||||||
id: lightClustering
|
id: lightClustering
|
||||||
spacing: 10
|
spacing: 10
|
||||||
property var mainViewTask: Render.getConfig("RenderMainView");
|
|
||||||
|
|
||||||
Column{
|
Column{
|
||||||
PlotPerf {
|
PlotPerf {
|
||||||
title: "Light CLustering Timing"
|
title: "Light CLustering Timing"
|
||||||
height: 50
|
height: 50
|
||||||
object: mainViewTask.getConfig("LightClustering")
|
object: Render.getConfig("RenderMainView.LightClustering")
|
||||||
valueUnit: "ms"
|
valueUnit: "ms"
|
||||||
valueScale: 1
|
valueScale: 1
|
||||||
valueNumDigits: "4"
|
valueNumDigits: "4"
|
||||||
plots: [
|
plots: [
|
||||||
{
|
{
|
||||||
object: mainViewTask.getConfig("LightClustering"),
|
object: Render.getConfig("RenderMainView.LightClustering"),
|
||||||
prop: "cpuRunTime",
|
prop: "cpuRunTime",
|
||||||
label: "time",
|
label: "time",
|
||||||
scale: 1,
|
scale: 1,
|
||||||
|
@ -41,19 +40,19 @@ Column {
|
||||||
PlotPerf {
|
PlotPerf {
|
||||||
title: "Lights"
|
title: "Lights"
|
||||||
height: 50
|
height: 50
|
||||||
object: mainViewTask.getConfig("LightClustering")
|
object: Render.getConfig("RenderMainView.LightClustering")
|
||||||
valueUnit: ""
|
valueUnit: ""
|
||||||
valueScale: 1
|
valueScale: 1
|
||||||
valueNumDigits: "0"
|
valueNumDigits: "0"
|
||||||
plots: [
|
plots: [
|
||||||
{
|
{
|
||||||
object: mainViewTask.getConfig("LightClustering"),
|
object: Render.getConfig("RenderMainView.LightClustering"),
|
||||||
prop: "numClusteredLights",
|
prop: "numClusteredLights",
|
||||||
label: "visible",
|
label: "visible",
|
||||||
color: "#D959FE"
|
color: "#D959FE"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
object: mainViewTask.getConfig("LightClustering"),
|
object: Render.getConfig("RenderMainView.LightClustering"),
|
||||||
prop: "numInputLights",
|
prop: "numInputLights",
|
||||||
label: "input",
|
label: "input",
|
||||||
color: "#FED959"
|
color: "#FED959"
|
||||||
|
@ -64,25 +63,25 @@ Column {
|
||||||
PlotPerf {
|
PlotPerf {
|
||||||
title: "Scene Lights"
|
title: "Scene Lights"
|
||||||
height: 80
|
height: 80
|
||||||
object: mainViewTask.getConfig("LightClustering")
|
object: Render.getConfig("RenderMainView.LightClustering")
|
||||||
valueUnit: ""
|
valueUnit: ""
|
||||||
valueScale: 1
|
valueScale: 1
|
||||||
valueNumDigits: "0"
|
valueNumDigits: "0"
|
||||||
plots: [
|
plots: [
|
||||||
{
|
{
|
||||||
object: mainViewTask.getConfig("LightClustering"),
|
object: Render.getConfig("RenderMainView.LightClustering"),
|
||||||
prop: "numSceneLights",
|
prop: "numSceneLights",
|
||||||
label: "current",
|
label: "current",
|
||||||
color: "#00B4EF"
|
color: "#00B4EF"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
object: mainViewTask.getConfig("LightClustering"),
|
object: Render.getConfig("RenderMainView.LightClustering"),
|
||||||
prop: "numFreeSceneLights",
|
prop: "numFreeSceneLights",
|
||||||
label: "free",
|
label: "free",
|
||||||
color: "#1AC567"
|
color: "#1AC567"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
object: mainViewTask.getConfig("LightClustering"),
|
object: Render.getConfig("RenderMainView.LightClustering"),
|
||||||
prop: "numAllocatedSceneLights",
|
prop: "numAllocatedSceneLights",
|
||||||
label: "allocated",
|
label: "allocated",
|
||||||
color: "#9495FF"
|
color: "#9495FF"
|
||||||
|
@ -93,7 +92,7 @@ Column {
|
||||||
ConfigSlider {
|
ConfigSlider {
|
||||||
label: qsTr("Range Near [m]")
|
label: qsTr("Range Near [m]")
|
||||||
integral: false
|
integral: false
|
||||||
config: mainViewTask.getConfig("LightClustering")
|
config: Render.getConfig("RenderMainView.LightClustering")
|
||||||
property: "rangeNear"
|
property: "rangeNear"
|
||||||
max: 20.0
|
max: 20.0
|
||||||
min: 0.1
|
min: 0.1
|
||||||
|
@ -101,7 +100,7 @@ Column {
|
||||||
ConfigSlider {
|
ConfigSlider {
|
||||||
label: qsTr("Range Far [m]")
|
label: qsTr("Range Far [m]")
|
||||||
integral: false
|
integral: false
|
||||||
config: mainViewTask.getConfig("LightClustering")
|
config: Render.getConfig("RenderMainView.LightClustering")
|
||||||
property: "rangeFar"
|
property: "rangeFar"
|
||||||
max: 500.0
|
max: 500.0
|
||||||
min: 100.0
|
min: 100.0
|
||||||
|
@ -109,7 +108,7 @@ Column {
|
||||||
ConfigSlider {
|
ConfigSlider {
|
||||||
label: qsTr("Grid X")
|
label: qsTr("Grid X")
|
||||||
integral: true
|
integral: true
|
||||||
config: mainViewTask.getConfig("LightClustering")
|
config: Render.getConfig("RenderMainView.LightClustering")
|
||||||
property: "dimX"
|
property: "dimX"
|
||||||
max: 32
|
max: 32
|
||||||
min: 1
|
min: 1
|
||||||
|
@ -117,7 +116,7 @@ Column {
|
||||||
ConfigSlider {
|
ConfigSlider {
|
||||||
label: qsTr("Grid Y")
|
label: qsTr("Grid Y")
|
||||||
integral: true
|
integral: true
|
||||||
config: mainViewTask.getConfig("LightClustering")
|
config: Render.getConfig("RenderMainView.LightClustering")
|
||||||
property: "dimY"
|
property: "dimY"
|
||||||
max: 32
|
max: 32
|
||||||
min: 1
|
min: 1
|
||||||
|
@ -125,33 +124,33 @@ Column {
|
||||||
ConfigSlider {
|
ConfigSlider {
|
||||||
label: qsTr("Grid Z")
|
label: qsTr("Grid Z")
|
||||||
integral: true
|
integral: true
|
||||||
config: mainViewTask.getConfig("LightClustering")
|
config: Render.getConfig("RenderMainView.LightClustering")
|
||||||
property: "dimZ"
|
property: "dimZ"
|
||||||
max: 31
|
max: 31
|
||||||
min: 1
|
min: 1
|
||||||
}
|
}
|
||||||
CheckBox {
|
CheckBox {
|
||||||
text: "Freeze"
|
text: "Freeze"
|
||||||
checked: mainViewTask.getConfig("LightClustering")["freeze"]
|
checked: Render.getConfig("RenderMainView.LightClustering")["freeze"]
|
||||||
onCheckedChanged: { mainViewTask.getConfig("LightClustering")["freeze"] = checked }
|
onCheckedChanged: { Render.getConfig("RenderMainView.LightClustering")["freeze"] = checked }
|
||||||
}
|
}
|
||||||
CheckBox {
|
CheckBox {
|
||||||
text: "Draw Grid"
|
text: "Draw Grid"
|
||||||
checked: mainViewTask.getConfig("DebugLightClusters")["doDrawGrid"]
|
checked: Render.getConfig("RenderMainView.DebugLightClusters")["doDrawGrid"]
|
||||||
onCheckedChanged: { mainViewTask.getConfig("DebugLightClusters")["doDrawGrid"] = checked }
|
onCheckedChanged: { Render.getConfig("RenderMainView.DebugLightClusters")["doDrawGrid"] = checked }
|
||||||
}
|
}
|
||||||
CheckBox {
|
CheckBox {
|
||||||
text: "Draw Cluster From Depth"
|
text: "Draw Cluster From Depth"
|
||||||
checked: mainViewTask.getConfig("DebugLightClusters")["doDrawClusterFromDepth"]
|
checked: Render.getConfig("RenderMainView.DebugLightClusters")["doDrawClusterFromDepth"]
|
||||||
onCheckedChanged: { mainViewTask.getConfig("DebugLightClusters")["doDrawClusterFromDepth"] = checked }
|
onCheckedChanged: { Render.getConfig("RenderMainView.DebugLightClusters")["doDrawClusterFromDepth"] = checked }
|
||||||
}
|
}
|
||||||
CheckBox {
|
CheckBox {
|
||||||
text: "Draw Content"
|
text: "Draw Content"
|
||||||
checked: mainViewTask.getConfig("DebugLightClusters")["doDrawContent"]
|
checked: Render.getConfig("RenderMainView.DebugLightClusters")["doDrawContent"]
|
||||||
onCheckedChanged: { mainViewTask.getConfig("DebugLightClusters")["doDrawContent"] = checked }
|
onCheckedChanged: { Render.getConfig("RenderMainView.DebugLightClusters")["doDrawContent"] = checked }
|
||||||
}
|
}
|
||||||
Label {
|
Label {
|
||||||
text: "Num Cluster Items = " + mainViewTask.getConfig("LightClustering")["numClusteredLightReferences"].toFixed(0)
|
text: "Num Cluster Items = " + Render.getConfig("RenderMainView.LightClustering")["numClusteredLightReferences"].toFixed(0)
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -14,8 +14,8 @@ var qml = Script.resolvePath('stats.qml');
|
||||||
var window = new OverlayWindow({
|
var window = new OverlayWindow({
|
||||||
title: 'Render Stats',
|
title: 'Render Stats',
|
||||||
source: qml,
|
source: qml,
|
||||||
width: 320,
|
width: 400,
|
||||||
height: 720
|
height: 400
|
||||||
});
|
});
|
||||||
window.setPosition(500, 50);
|
window.setPosition(500, 50);
|
||||||
window.closed.connect(function() { Script.stop(); });
|
window.closed.connect(function() { Script.stop(); });
|
|
@ -21,99 +21,13 @@ Item {
|
||||||
spacing: 8
|
spacing: 8
|
||||||
anchors.fill:parent
|
anchors.fill:parent
|
||||||
|
|
||||||
property var mainViewTask: Render.getConfig("RenderMainView");
|
property var config: Render.getConfig("Stats")
|
||||||
property var config: mainViewTask.getConfig("Stats")
|
|
||||||
|
|
||||||
function evalEvenHeight() {
|
function evalEvenHeight() {
|
||||||
// Why do we have to do that manually ? cannot seem to find a qml / anchor / layout mode that does that ?
|
// Why do we have to do that manually ? cannot seem to find a qml / anchor / layout mode that does that ?
|
||||||
return (height - spacing * (children.length - 1)) / children.length
|
return (height - spacing * (children.length - 1)) / children.length
|
||||||
}
|
}
|
||||||
|
|
||||||
PlotPerf {
|
|
||||||
title: "Num Buffers"
|
|
||||||
height: parent.evalEvenHeight()
|
|
||||||
object: stats.config
|
|
||||||
plots: [
|
|
||||||
{
|
|
||||||
prop: "bufferCPUCount",
|
|
||||||
label: "CPU",
|
|
||||||
color: "#00B4EF"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
prop: "bufferGPUCount",
|
|
||||||
label: "GPU",
|
|
||||||
color: "#1AC567"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
PlotPerf {
|
|
||||||
title: "gpu::Buffer Memory"
|
|
||||||
height: parent.evalEvenHeight()
|
|
||||||
object: stats.config
|
|
||||||
valueScale: 1048576
|
|
||||||
valueUnit: "Mb"
|
|
||||||
valueNumDigits: "1"
|
|
||||||
plots: [
|
|
||||||
{
|
|
||||||
prop: "bufferCPUMemoryUsage",
|
|
||||||
label: "CPU",
|
|
||||||
color: "#00B4EF"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
prop: "bufferGPUMemoryUsage",
|
|
||||||
label: "GPU",
|
|
||||||
color: "#1AC567"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
PlotPerf {
|
|
||||||
title: "Num Textures"
|
|
||||||
height: parent.evalEvenHeight()
|
|
||||||
object: stats.config
|
|
||||||
plots: [
|
|
||||||
{
|
|
||||||
prop: "textureCPUCount",
|
|
||||||
label: "CPU",
|
|
||||||
color: "#00B4EF"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
prop: "textureGPUCount",
|
|
||||||
label: "GPU",
|
|
||||||
color: "#1AC567"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
prop: "texturePendingGPUTransferCount",
|
|
||||||
label: "Transfer",
|
|
||||||
color: "#9495FF"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
PlotPerf {
|
|
||||||
title: "gpu::Texture Memory"
|
|
||||||
height: parent.evalEvenHeight()
|
|
||||||
object: stats.config
|
|
||||||
valueScale: 1048576
|
|
||||||
valueUnit: "Mb"
|
|
||||||
valueNumDigits: "1"
|
|
||||||
plots: [
|
|
||||||
{
|
|
||||||
prop: "textureCPUMemoryUsage",
|
|
||||||
label: "CPU",
|
|
||||||
color: "#00B4EF"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
prop: "textureGPUMemoryUsage",
|
|
||||||
label: "GPU",
|
|
||||||
color: "#1AC567"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
prop: "textureGPUVirtualMemoryUsage",
|
|
||||||
label: "GPU Virtual",
|
|
||||||
color: "#9495FF"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
|
|
||||||
PlotPerf {
|
PlotPerf {
|
||||||
title: "Triangles"
|
title: "Triangles"
|
||||||
height: parent.evalEvenHeight()
|
height: parent.evalEvenHeight()
|
||||||
|
@ -183,9 +97,9 @@ Item {
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
property var drawOpaqueConfig: mainViewTask.getConfig("DrawOpaqueDeferred")
|
property var drawOpaqueConfig: Render.getConfig("RenderMainView.DrawOpaqueDeferred")
|
||||||
property var drawTransparentConfig: mainViewTask.getConfig("DrawTransparentDeferred")
|
property var drawTransparentConfig: Render.getConfig("RenderMainView.DrawTransparentDeferred")
|
||||||
property var drawLightConfig: mainViewTask.getConfig("DrawLight")
|
property var drawLightConfig: Render.getConfig("RenderMainView.DrawLight")
|
||||||
|
|
||||||
PlotPerf {
|
PlotPerf {
|
||||||
title: "Items"
|
title: "Items"
|
||||||
|
@ -200,13 +114,13 @@ Item {
|
||||||
color: "#1AC567"
|
color: "#1AC567"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
object: mainViewTask.getConfig("DrawTransparentDeferred"),
|
object: Render.getConfig("RenderMainView.DrawTransparentDeferred"),
|
||||||
prop: "numDrawn",
|
prop: "numDrawn",
|
||||||
label: "Translucents",
|
label: "Translucents",
|
||||||
color: "#00B4EF"
|
color: "#00B4EF"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
object: mainViewTask.getConfig("DrawLight"),
|
object: Render.getConfig("RenderMainView.DrawLight"),
|
||||||
prop: "numDrawn",
|
prop: "numDrawn",
|
||||||
label: "Lights",
|
label: "Lights",
|
||||||
color: "#FED959"
|
color: "#FED959"
|
||||||
|
@ -223,25 +137,25 @@ Item {
|
||||||
valueNumDigits: "2"
|
valueNumDigits: "2"
|
||||||
plots: [
|
plots: [
|
||||||
{
|
{
|
||||||
object: mainViewTask.getConfig("DrawOpaqueDeferred"),
|
object: Render.getConfig("RenderMainView.DrawOpaqueDeferred"),
|
||||||
prop: "cpuRunTime",
|
prop: "cpuRunTime",
|
||||||
label: "Opaques",
|
label: "Opaques",
|
||||||
color: "#1AC567"
|
color: "#1AC567"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
object: mainViewTask.getConfig("DrawTransparentDeferred"),
|
object: Render.getConfig("RenderMainView.DrawTransparentDeferred"),
|
||||||
prop: "cpuRunTime",
|
prop: "cpuRunTime",
|
||||||
label: "Translucents",
|
label: "Translucents",
|
||||||
color: "#00B4EF"
|
color: "#00B4EF"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
object: mainViewTask.getConfig("RenderDeferred"),
|
object: Render.getConfig("RenderMainView.RenderDeferred"),
|
||||||
prop: "cpuRunTime",
|
prop: "cpuRunTime",
|
||||||
label: "Lighting",
|
label: "Lighting",
|
||||||
color: "#FED959"
|
color: "#FED959"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
object: mainViewTask.getConfig("RenderDeferredTask"),
|
object: Render.getConfig("RenderMainView.RenderDeferredTask"),
|
||||||
prop: "cpuRunTime",
|
prop: "cpuRunTime",
|
||||||
label: "RenderFrame",
|
label: "RenderFrame",
|
||||||
color: "#E2334D"
|
color: "#E2334D"
|
||||||
|
|
|
@ -20,9 +20,7 @@ Item {
|
||||||
id: stats
|
id: stats
|
||||||
spacing: 8
|
spacing: 8
|
||||||
anchors.fill:parent
|
anchors.fill:parent
|
||||||
|
|
||||||
property var mainViewTask: Render.getConfig("RenderMainView");
|
|
||||||
|
|
||||||
function evalEvenHeight() {
|
function evalEvenHeight() {
|
||||||
// Why do we have to do that manually ? cannot seem to find a qml / anchor / layout mode that does that ?
|
// Why do we have to do that manually ? cannot seem to find a qml / anchor / layout mode that does that ?
|
||||||
return (height - spacing * (children.length - 1)) / children.length
|
return (height - spacing * (children.length - 1)) / children.length
|
||||||
|
|
Loading…
Reference in a new issue