Aegis2D
Modular C++26 2D game engine for networked games
Loading...
Searching...
No Matches
metrics_overlay.hpp File Reference

Frame metrics and the overlay that shows them: frames per second, a graph of the frame times, entities, sprites and draw calls. More...

#include <aegis2d/render/bitmap_font.hpp>
#include <aegis2d/render/color.hpp>
#include <aegis2d/render/export.hpp>
#include <aegis2d/render/renderer.hpp>
#include <array>
#include <chrono>
#include <cstddef>
#include <cstdint>
#include <optional>
#include <span>
#include <string>

Go to the source code of this file.

Classes

class  aegis2d::render::FrameMetrics
 Durations of the last frames, and the frame rate they make. More...
 
struct  aegis2d::render::MetricsOverlayStyle
 Where and how the metrics overlay is drawn. More...
 
class  aegis2d::render::MetricsOverlay
 Overlay of the frame metrics, for developers: frames per second, frame times, entities, sprites and draw calls of the frame before, the memory of the process, the game's own lines (its network numbers...), and a bar per frame kept. More...
 

Namespaces

namespace  aegis2d
 Root namespace of the engine.
 
namespace  aegis2d::render
 OpenGL renderer: sprites, text and camera (client only).
 

Functions

std::string aegis2d::render::metrics_text (const FrameMetrics &metrics, FrameStats stats, std::optional< std::size_t > entities, std::optional< std::size_t > memory=std::nullopt, std::span< const std::string > lines={})
 Text of the metrics overlay.
 

Detailed Description

Frame metrics and the overlay that shows them: frames per second, a graph of the frame times, entities, sprites and draw calls.