TESTIMGUI: added profiler to test application

master
Martin Gerhardy 2018-06-12 07:38:03 +02:00
parent df5d946910
commit 4a1400eebc
2 changed files with 6 additions and 0 deletions

View File

@ -5,6 +5,7 @@
#include "ShaderManager.h"
#include "core/Var.h"
#include "core/Log.h"
#include "core/Trace.h"
namespace video {
@ -21,6 +22,7 @@ void ShaderManager::unregisterShader(Shader* shader) {
}
void ShaderManager::update() {
core_trace_scoped(ShaderManagerUpdate);
bool refreshShaders = core::Var::check([&] (const core::VarPtr& var) {
if (!var->isDirty()) {
return false;

View File

@ -24,6 +24,10 @@ void TestIMGUI::onRenderUI() {
if (ImGui::Button("Metrics Window")) {
_showMetricsWindow ^= true;
}
bool temp = _renderTracing;
if (ImGui::Checkbox("Toggle profiler", &temp)) {
_renderTracing = toggleTrace();
}
if (ImGui::Button("Quit")) {
requestQuit();
}