bettola/client/src/debug/debug_overlay.h
Ritchie Cunningham 1cbf8ff0d8 [Add] Debug overlay and UI fixes.
- Real time on-screen debug overlay to display performance metrics.
  Overlay can be toggled with C-d.

[Fixed]
- Corrects a "click-through" bug by implementing Z-ordering for window
  stack.
- Decouples taskbar from window z-order to provide a stable button
  layout that isn't affected by focus changes.
- Adds culling to the terminal history view to prevent rendering
  off-screen lines.
2025-10-05 00:46:19 +01:00

25 lines
446 B
C++

#pragma once
class UIRenderer;
/**
* Renders real-time performance metrics on screen.
*/
class DebugOverlay {
public:
DebugOverlay(void);
void update(float dt, int draw_calls, int shape_verts, int txt_verts);
void render(UIRenderer* ui_renderer);
private:
float _fps;
float _frame_time;
int _draw_calls;
int _shape_vertices;
int _text_vertices;
/* Oh? You want to be able to read the stats?! */
float _update_timer;
};