From df4256c9e8c3cd9cb2115f90004f97b83e0729fe Mon Sep 17 00:00:00 2001 From: omar Date: Thu, 21 Apr 2022 05:19:01 +0200 Subject: [PATCH] Demo: tweak for runtime speed. (#353) --- implot_demo.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/implot_demo.cpp b/implot_demo.cpp index d7465fb..e5f7a88 100644 --- a/implot_demo.cpp +++ b/implot_demo.cpp @@ -663,7 +663,7 @@ void ShowDemo_Heatmaps() { ImGui::SameLine(); - const int size = 200; + const int size = 80; static double values2[size*size]; srand((unsigned int)(ImGui::GetTime()*1000000)); for (int i = 0; i < size*size; ++i) @@ -749,15 +749,15 @@ void ShowDemo_Histogram() { } void ShowDemo_Histogram2D() { - static int count = 500000; - static int xybins[2] = {200,200}; + static int count = 50000; + static int xybins[2] = {100,100}; static bool density2 = false; - ImGui::SliderInt("Count",&count,100,500000); + ImGui::SliderInt("Count",&count,100,100000); ImGui::SliderInt2("Bins",xybins,1,500); ImGui::SameLine(); ImGui::Checkbox("Density##2",&density2); - static NormalDistribution<500000> dist1(1, 2); - static NormalDistribution<500000> dist2(1, 1); + static NormalDistribution<100000> dist1(1, 2); + static NormalDistribution<100000> dist2(1, 1); double max_count = 0; ImPlotAxisFlags flags = ImPlotAxisFlags_AutoFit|ImPlotAxisFlags_Foreground; ImPlot::PushColormap("Hot");