From 0ea70f234fd83ac9dfe7bd3bc327ee5e81001dcc Mon Sep 17 00:00:00 2001 From: Zach Pomerantz Date: Mon, 14 Mar 2016 17:49:17 -0700 Subject: [PATCH] Add bg gpu timer display --- examples/utilities/tools/render/BG.qml | 22 ++++++++++++++++++++++ examples/utilities/tools/render/debugBG.js | 21 +++++++++++++++++++++ 2 files changed, 43 insertions(+) create mode 100644 examples/utilities/tools/render/BG.qml create mode 100644 examples/utilities/tools/render/debugBG.js diff --git a/examples/utilities/tools/render/BG.qml b/examples/utilities/tools/render/BG.qml new file mode 100644 index 0000000000..40ce5a89fe --- /dev/null +++ b/examples/utilities/tools/render/BG.qml @@ -0,0 +1,22 @@ +// +// BG.qml +// examples/utilities/tools/render +// +// Created by Zach Pomerantz on 2/8/2016 +// Copyright 2016 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 + +Item { + Timer { + running: true; repeat: true + onTriggered: time.text = Render.getConfig("DrawBackgroundDeferred").gpuTime + } + + Text { id: time; font.pointSize: 20 } +} + diff --git a/examples/utilities/tools/render/debugBG.js b/examples/utilities/tools/render/debugBG.js new file mode 100644 index 0000000000..21fe024c32 --- /dev/null +++ b/examples/utilities/tools/render/debugBG.js @@ -0,0 +1,21 @@ +// +// debugBG.js +// examples/utilities/tools/render +// +// Zach Pomerantz, created on 1/27/2016. +// Copyright 2016 High Fidelity, Inc. +// +// Distributed under the Apache License, Version 2.0. +// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html +// + +// Set up the qml ui +var qml = Script.resolvePath('BG.qml'); +var window = new OverlayWindow({ + title: 'Background Timer', + source: qml, + width: 300 +}); +window.setPosition(25, 50); +window.closed.connect(function() { Script.stop(); }); +