diff --git a/implot_demo.cpp b/implot_demo.cpp index d145d5b..cef1e0d 100644 --- a/implot_demo.cpp +++ b/implot_demo.cpp @@ -114,7 +114,7 @@ struct BenchmarkItem { } Col = ImVec4((float)RandomRange(0,1),(float)RandomRange(0,1),(float)RandomRange(0,1),1); } - ~BenchmarkItem() { delete Data; } + ~BenchmarkItem() { delete[] Data; } t_float2* Data; ImVec4 Col; }; @@ -972,6 +972,7 @@ void ShowDemoWindow(bool* p_open) { static BenchmarkItem items[n_items]; ImGui::BulletText("Make sure VSync is disabled."); ImGui::BulletText("%d lines with %d points each @ %.3f FPS.",n_items,1000,ImGui::GetIO().Framerate); + ImPlot::SetNextPlotLimits(0,1,0,1,ImGuiCond_Always); if (ImPlot::BeginPlot("##Bench",NULL,NULL,ImVec2(-1,0),ImPlotFlags_Default | ImPlotFlags_NoChild)) { char buff[16]; for (int i = 0; i < 100; ++i) {