7#include <aegis2d/render/export.hpp>
37 [[nodiscard]]
bool in_frame() const noexcept override;
39 [[nodiscard]]
FrameStats stats() const noexcept override;
41 void set_camera(const
std::optional<
Camera>& camera) override;
43 [[nodiscard]] const
std::optional<
Camera>& camera() const noexcept override;
48 [[nodiscard]]
std::span<const
Sprite> sprites() const noexcept;
52 [[nodiscard]]
Color clear_color() const noexcept;
56 [[nodiscard]]
std::
size_t textures() const noexcept;
62 [[nodiscard]]
std::
size_t texture_updates(
TextureId texture) const;
66 [[nodiscard]]
std::uint64_t frames() const noexcept;
70 std::vector<
std::
size_t> updates_;
75 std::uint64_t frames_ = 0;
76 bool in_frame_ = false;
2D camera: the part of a world larger than the screen that is shown.
The part of the world shown on screen: where it looks, how close, within which bounds.
Definition camera.hpp:31
IRenderer without window nor graphics API, which keeps the sprites of each frame.
Definition headless_renderer.hpp:22
void end_frame() override
Finishes the current frame and shows it.
void begin_frame(Color clear) override
Starts a frame and fills the screen with one color.
bool in_frame() const noexcept override
Tells whether a frame is started.
TextureId create_texture(const Image &image) override
Makes a texture of an image, to draw sprites with.
void draw(const Sprite &sprite) override
Adds a sprite to the current frame.
void update_texture(TextureId texture, const Image &image) override
Replaces the image of a texture, which keeps its identifier.
TextureSize texture_size(TextureId texture) const override
Size of a texture.
What the game draws with, whatever the graphics API behind it.
Definition renderer.hpp:81
RGBA color used by the renderer.
OpenGL renderer: sprites, text and camera (client only).
Definition bitmap_font.hpp:16
std::uint32_t TextureId
Identifier of a texture loaded by the resource manager.
Definition renderer.hpp:32
Definition endpoint.hpp:85
Backend-independent renderer interface and the sprite it draws.
RGBA color with components in [0, 1].
Definition color.hpp:10
Counters of the last finished frame.
Definition renderer.hpp:64
RGBA image with 8 bits per channel, ready to become a texture.
Definition image.hpp:25
One textured quad to draw.
Definition renderer.hpp:46
Width and height of a texture, in pixels.
Definition renderer.hpp:38