C++ API
The reference is generated from the public headers in this documentation version. It covers Cheryl-owned engine headers, startup and worker-topology support, and the GLFW, OpenGL, TGUI, RmlUi and miniaudio modules. These are backend modules; their availability depends on the targets enabled in your build.
Namespaces
Namespaces group declarations by the work they do. Backend implementations live
beneath their portable domain; an asset family’s metadata and operations live
beside that family. Repeated names such as Asset, Definition, and Manager
have a specific meaning within their owner.
Domain |
Responsibility |
|---|---|
Command-line configuration, startup, and backend composition |
|
Game hooks and update context |
|
Live engine context, game sessions, and owner-thread dispatch; |
|
Reusable pools, groups, topology, and CPU placement; |
|
Physical controls and input transport; |
|
Asset families ( |
|
Cameras, frames, draw packets, and portable |
|
Concrete OpenGL resources, rendering, and native context integration |
|
Portable window/display contracts; |
|
Font selection and shaping; |
|
Blocks, allocators, object pools, pointers, and byte-size/fit helpers |
|
State utilities, clocks/durations, packed bits, and file indexing |
|
|
Audio, generic event delivery, logging, diagnostics, and failures |
Input capture and routing are shared game/UI protocols. They do not depend on a
widget toolkit. Likewise, worker facilities do not require a running game session.
Namespace ownership and CMake link targets serve different purposes: these
portable facilities are still provided by Cheryl::Engine.
Entry points
Task |
Entry point |
Declaring header |
|---|---|---|
Configure application startup |
||
Implement game hooks |
||
Prepare and upload assets |
||
Select immutable font data |
||
Retain sprite resources |
||
Find loaded sprites |
See CE::Runtime::Simulation::UpdateKind for simulation update kinds,
CE::Text::FontSource for font selection sources, and
CE::Assets::Cache::Store for the retained-cache template inherited by
the sprite manager. Derived pages show their declarations and explicit imported
overloads, then link to base pages for inherited interfaces. Read inherited
function templates on their declaring base so their parameters and lookup rules
remain accurate. Private implementation members are excluded.
Native input declarations are shown with CHERYL_NATIVE_INPUT=1; enable that
feature when using its adapters or the startup overload that owns native input.
Debug-terminal startup is also documented, but is available only to build-tree
consumers through Cheryl::DebugTerminal::Startup, rather than the installed SDK.
The generated signatures preserve parameter types, defaults and common function
qualifiers. Requires clauses and final/[[nodiscard]] annotations appear beneath
their declarations. The linked source headers provide the complete declarations.
Use the asset-loading guide, sprite and playback guide, and text guide for ownership and operation sequences. The first-game walkthrough connects these APIs in a maintained application.
Migration
This reorganization changes C++ source names and ABI. Rebuild consumers with the matching engine version. Existing include paths and CMake target names remain available; old names are not re-exported through compatibility aliases.
Previous name |
Current name |
|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Global state utilities / duration helpers / |
Replace broad imports of the former namespaces with qualified names or local aliases for the family you use. For example:
namespace Sprites = CE::Assets::Sprites;
auto sprite = Sprites::Manager::get().get_asset("first-game", "actor");
Family managers use load() and reload() where the family identifies the
resource kind. The shader catalogue uses find_program() and find_material();
the image manager’s decoded-image upload is upload(). The aggregate loading
entry point remains CE::Assets::Loading::Loader::load_assets().