17
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-10-17 19:09:25 +02:00
Files
maszyna/widgets/perfgraphs.cppm
maj00r b8f040e6fd propagate template headers transitively, import Console where used
AnimModel.cpp reaches cParser through the simulation core, not a direct
import, so the previous pass missed it; the propagation now follows the
whole import closure. Train.cpp, drivermode.cpp and Globals.cpp call
Console:: inside _WIN32 guards without importing eu07.console - invisible
on Linux, where those blocks are skipped.
2026-09-10 01:41:24 +02:00

68 lines
1.0 KiB
C++

module;
#include <chrono>
#include <deque>
#include <limits>
#include <mutex>
#include <ostream>
#include <sstream>
#include <type_traits>
#include <unordered_map>
#include <utility>
#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