R-Type 0.1
Loading...
Searching...
No Matches
rtk::ecs::concepts::IsRenderWindow Concept Reference

Requirements for the window backend used by the render and input systems. More...

#include <systems/RenderConcept.hpp>

Concept definition

template<typename T>
concept rtk::ecs::concepts::IsRenderWindow = requires(T window, Event &event, ColorRGBA8 color,
std::span<const SpriteData> sprites) {
{ window.pollEvents(event) } -> std::same_as<bool>;
{ window.beginFrame(color) } -> std::same_as<bool>;
{ window.draw(sprites) } -> std::same_as<void>;
{ window.endFrame() } -> std::same_as<void>;
}
Requirements for the window backend used by the render and input systems.
Definition RenderConcept.hpp:365

Detailed Description

Requirements for the window backend used by the render and input systems.

The backend fills an Event in pollEvents(), which returns false once the window is closed, and draws a batch of sprites between beginFrame() and endFrame().

Template Parameters
TCandidate window backend.