|
R-Type 0.1
|
Adapts the window of the graphical library to the IsRenderWindow concept. More...
#include <rtkWindowAdapter.hpp>
Public Member Functions | |
| RtkWindowAdapter (rtk::RenderWindow &window) | |
| Wraps a window. | |
| bool | pollEvents (rtk::ecs::concepts::Event &engineEvent) |
| Polls window events and points the engine Event at them. | |
| bool | beginFrame (rtk::ecs::concepts::ColorRGBA8 color) |
| Starts a frame cleared with a color. | |
| void | draw (std::span< const rtk::ecs::concepts::SpriteData > sprites) |
| Draws a batch of sprites. | |
| void | endFrame () |
| Presents the frame. | |
Adapts the window of the graphical library to the IsRenderWindow concept.
|
inline |
Wraps a window.
| window | Window to adapt, which must outlive the adapter. |
|
inline |
Polls window events and points the engine Event at them.
| engineEvent | Event filled with the backend queries. |
|
inline |
Starts a frame cleared with a color.
| color | Clear color, alpha is ignored. |
|
inline |
Draws a batch of sprites.
| sprites | Sprites to draw. |