17
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-10-17 09:49:19 +02:00
Files
maszyna/widgets/perfgraphs.cppm
maj00r 2896c2dd60 add the C library headers MSVC needs
Unqualified uint8_t/size_t and friends were reaching 24 units through
some other header on libstdc++; MSVC's STL does not do that, which broke
gl/ubo.cppm (and made its UBS_PAD macro look like garbage). Also
silences C5244, MSVC's counterpart to the clang warning about glm being
included in the module purview, which is deliberate here.
2026-09-10 00:10:52 +02:00

59 lines
893 B
C++

module;
#include <cstddef>
#include <array>
#include <string>
#include <vector>
export module eu07.widgets.perfgraphs;
import eu07.application.uilayer;
export {
class perfgraph_panel : public ui_panel
{
std::array<float, 400> history = { 0 };
size_t pos = 0;
enum timers_e {
gfx_total = 0,
gfx_color,
gfx_shadows,
gfx_reflections,
gfx_swap,
gfx_gui,
gfx_animate,
sim_total,
sim_dynamics,
sim_events,
sim_ai,
mainloop_total,
TIMER_MAX
};
float max = 50.0f;
timers_e current_timer = mainloop_total;
std::vector<std::string> timer_label =
{
"gfx_total",
"gfx_color",
"gfx_shadows",
"gfx_reflections",
"gfx_swap",
"gfx_gui",
"gfx_animate",
"sim_total",
"sim_dynamics",
"sim_events",
"sim_ai",
"mainloop_total"
};
public:
perfgraph_panel();
void render_contents() override;
};
} // export