From 1f86df4c54172bdabb90a12ed040f8c01a3155d5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Branimir=20Karad=C5=BEi=C4=87?= Date: Thu, 2 Nov 2017 22:09:03 -0700 Subject: [PATCH] Cleanup. --- examples/common/example-glue.cpp | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/examples/common/example-glue.cpp b/examples/common/example-glue.cpp index 5a5bde2cb..d9f9397c6 100644 --- a/examples/common/example-glue.cpp +++ b/examples/common/example-glue.cpp @@ -196,13 +196,13 @@ void showExampleDialog(entry::AppI* _app, const char* _errorText) ImVec4 gpuColor(0.5f, 0.5f, 1.0f, 1.0f); const float itemHeight = ImGui::GetTextLineHeightWithSpacing(); + const double toCpuMs = 1000.0/double(stats->cpuTimerFreq); + const double toGpuMs = 1000.0/double(stats->gpuTimerFreq); + const float scale = 3.0f; if (ImGui::ListBoxHeader("Encoders", ImVec2(ImGui::GetWindowWidth(), stats->numEncoders*itemHeight) ) ) { ImGuiListClipper clipper(stats->numEncoders, itemHeight); - const double toCpuMs = 1000.0/double(stats->cpuTimerFreq); - const double toGpuMs = 1000.0/double(stats->gpuTimerFreq); - const float scale = 3.0f; while (clipper.Step() ) { @@ -239,10 +239,6 @@ void showExampleDialog(entry::AppI* _app, const char* _errorText) { ImGuiListClipper clipper(stats->numViews, itemHeight); - const double toCpuMs = 1000.0/double(stats->cpuTimerFreq); - const double toGpuMs = 1000.0/double(stats->gpuTimerFreq); - const float scale = 3.0f; - while (clipper.Step() ) { for (int32_t pos = clipper.DisplayStart; pos < clipper.DisplayEnd; ++pos)