16#include "RaylibPlatform.hpp"
17#include "RaylibRenderer.hpp"
18#include "RaylibAssetProvider.hpp"
36 RaylibBackend() =
default;
37 ~RaylibBackend()
override {
shutdown(); }
39 RaylibBackend(
const RaylibBackend &) =
delete;
40 RaylibBackend &operator=(
const RaylibBackend &) =
delete;
48 std::string_view
name()
const override {
return "Raylib"; }
55 std::unique_ptr<RaylibPlatform> platform_;
56 std::unique_ptr<RaylibRenderer> renderer_;
57 std::unique_ptr<RaylibAssetProvider> assets_;
58 bool initialized_{
false};
Unified host interface (IBackend) for backend-agnostic ZenitUI apps.
Abstract name-based lookup and runtime lifecycle for textures and shaders.
Definition UIContext.hpp:449
Unified window, frame-loop, and subsystem host for interchangeable backends.
Definition Backend.hpp:49
Abstract 2D rendering backend.
Definition UIContext.hpp:106
float deltaTime() const override
Return the elapsed time in seconds since the previous pollFrame().
void endDraw() override
Finish the frame and swap buffers.
std::string_view name() const override
Short human-readable backend identifier (e.g.
Definition RaylibBackend.hpp:48
IAssetProvider & assets() override
Access the underlying asset provider.
Definition RaylibBackend.hpp:52
bool init(const WindowConfig &config) override
Create the window and graphics context, and bind subsystems to UIContext.
void beginDraw(Color clearColor) override
Begin presenting a frame and clear the main framebuffer to clearColor.
IPlatform & platform() override
Access the underlying platform adapter.
Definition RaylibBackend.hpp:50
void shutdown() override
Release pooled targets, unbind UIContext, and tear down the window/context.
bool pollFrame() override
Pump OS events for the next frame; returns false when the window should close.
IRenderer & renderer() override
Access the underlying renderer adapter.
Definition RaylibBackend.hpp:51
8-bit-per-channel RGBA color, non-premultiplied.
Definition CoreTypes.hpp:78
Backend-agnostic window and graphics-context creation parameters.
Definition Backend.hpp:31