AutoFlowResearch / SmartPeak

Fast and Accurate CE-, GC- and LC-MS(/MS) Data Processing
MIT License
41 stars 13 forks source link

Increased max points to be displayed to 10 millions #470

Closed bertrandboudaud closed 2 years ago

bertrandboudaud commented 2 years ago

imgui is by default limited to 64k vertices display, which prevents us to display large plots (overflow displays a corrupted graph).

It's possible and safe to break this limitation by changing ImDrawIdx to unsigned int

 // Your renderer backend will need to support it (most example renderer backends support both 16/32-bit indices).
 // Another way to allow large meshes while keeping 16-bit indices is to handle ImDrawCmd::VtxOffset in your renderer.
 // Read about ImGuiBackendFlags_RendererHasVtxOffset for details.
//#define ImDrawIdx unsigned int

the number of points is increased to 10.000.000 tested with a graph using 2.500.000 points, and it looks smooth enough on a DTU machine.