le2d v0.4.7
2D game engine framework
 
Loading...
Searching...
No Matches
render_stats.hpp
Go to the documentation of this file.
1#pragma once
2#include <cstdint>
3
4namespace le {
5struct RenderStats {
6 std::int64_t draw_calls{};
7 std::int64_t triangles{};
8
9 constexpr void accumulate(RenderStats const& other) {
10 draw_calls += other.draw_calls;
11 triangles += other.triangles;
12 }
13
14 [[nodiscard]] constexpr auto accumulated(RenderStats const& other) const -> RenderStats {
15 auto ret = *this;
16 ret.accumulate(other);
17 return ret;
18 }
19};
20} // namespace le
Definition animation.hpp:8
Definition render_stats.hpp:5
std::int64_t draw_calls
Definition render_stats.hpp:6
constexpr void accumulate(RenderStats const &other)
Definition render_stats.hpp:9
constexpr auto accumulated(RenderStats const &other) const -> RenderStats
Definition render_stats.hpp:14
std::int64_t triangles
Definition render_stats.hpp:7