|
ZenitUI
Retained-mode C++20 UI framework
|
Unified IBackend host managing an SDL3 window, OpenGL 3.3 Core context, and SDL3Platform / SDL3Renderer / SDL3AssetProvider. More...
#include <SDL3Backend.hpp>
Public Member Functions | |
| SDL3Backend (const SDL3Backend &)=delete | |
| SDL3Backend & | operator= (const SDL3Backend &)=delete |
| bool | init (const WindowConfig &config) override |
| Create the window and graphics context, and bind subsystems to UIContext. | |
| 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. | |
| float | deltaTime () const override |
| Return the elapsed time in seconds since the previous pollFrame(). | |
| void | beginDraw (Color clearColor) override |
| Begin presenting a frame and clear the main framebuffer to clearColor. | |
| void | endDraw () override |
| Finish the frame and swap buffers. | |
| std::string_view | name () const override |
| Short human-readable backend identifier (e.g. | |
| IPlatform & | platform () override |
| Access the underlying platform adapter. | |
| IRenderer & | renderer () override |
| Access the underlying renderer adapter. | |
| IAssetProvider & | assets () override |
| Access the underlying asset provider. | |
| Public Member Functions inherited from ZenitUI::IBackend | |
| void | bindTo (UIContext &ctx) |
Attach this backend's adapters to ctx, unbinding any previous context. | |
| void | unbind () |
| Flush pooled targets and detach this backend from its bound context. | |
| UIContext * | boundContext () const |
| Return the currently bound UIContext, or nullptr if unbound. | |
| bool | initAndBind (const WindowConfig &config, UIContext &ctx) |
Initialize the backend and bind its adapters to ctx in one step. | |
Additional Inherited Members | |
| Protected Attributes inherited from ZenitUI::IBackend | |
| UIContext * | boundCtx_ {nullptr} |
Unified IBackend host managing an SDL3 window, OpenGL 3.3 Core context, and SDL3Platform / SDL3Renderer / SDL3AssetProvider.
|
inlineoverridevirtual |
Access the underlying asset provider.
Implements ZenitUI::IBackend.
|
overridevirtual |
Begin presenting a frame and clear the main framebuffer to clearColor.
Implements ZenitUI::IBackend.
|
inlineoverridevirtual |
Return the elapsed time in seconds since the previous pollFrame().
Implements ZenitUI::IBackend.
|
overridevirtual |
Finish the frame and swap buffers.
Implements ZenitUI::IBackend.
|
overridevirtual |
Create the window and graphics context, and bind subsystems to UIContext.
Implements ZenitUI::IBackend.
|
inlineoverridevirtual |
Short human-readable backend identifier (e.g.
"Raylib", "SDL3 + OpenGL 3.3").
Implements ZenitUI::IBackend.
|
inlineoverridevirtual |
Access the underlying platform adapter.
Implements ZenitUI::IBackend.
|
overridevirtual |
Pump OS events for the next frame; returns false when the window should close.
Implements ZenitUI::IBackend.
|
inlineoverridevirtual |
Access the underlying renderer adapter.
Implements ZenitUI::IBackend.
|
overridevirtual |
Release pooled targets, unbind UIContext, and tear down the window/context.
Implements ZenitUI::IBackend.