C++ API
The reference is generated from the public headers in this documentation version. It covers Cheryl-owned Engine headers, public Startup/Workers modules, and the GLFW, OpenGL, TGUI, RmlUi and miniaudio modules. Module availability depends on the targets enabled in your build.
For a known symbol, use Symbols below or search its qualified name. For an operation you have not chosen an API for, start with the Engine Systems tables or the task index, then return here for the exact contract. Migration is for existing consumers moving from the older names and binary boundaries; new projects can use the current entry points.
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
The Engine Systems tables group the public types and important enums by task, with detailed contract links. For physical control names, start with Input controls; for backend implementations, start with the adapter catalogue.
Include <cheryl/cheryl.h> and link Cheryl::Cheryl for the complete selected
assembly. Individual module umbrellas live under cheryl/modules/, and support
umbrellas under cheryl/support/. The consumer guide
explains source-checkout and SDK target selection.
Task |
Entry point |
Declaring header |
|---|---|---|
Configure application startup |
||
Implement game hooks |
||
Choose physical input controls |
|
|
Attach reusable per-consumer action bindings |
|
|
Prepare and upload assets |
||
Configure the application’s default and named fonts |
|
|
Select, save and restore a font choice |
|
|
Load a separate ordered font snapshot |
||
Retain and asynchronously replace a changing text label |
||
Rasterize toolkit font glyphs on CPU |
||
Retain sprite resources |
||
Draw a whole PNG without a sprite manifest |
||
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
The SDK/Engine/Startup/Workers major version is 4; Native GLFW, OpenGL, TGUI and RmlUi are major version 2 because their public layouts/implementation boundaries changed. Audio and the static terminal attachment retain their component versions. Rebuild consumers with one matched header/binary set. Startup/worker compatibility headers/targets remain available where their capability is enabled; the older C++ namespace names below are not re-exported as aliases.
Use the generic CE::Application::make_startup() and Cheryl-owned logging levels,
file callbacks, Engine input control enums/device snapshots and compiled OpenGL methods.
Private spdlog/Gainput/GLFW/GLAD implementation headers are no longer application
requirements. Native toolkit authoring remains part of the UI owners’ public ABI.
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().
Input bindings
Bind Engine enums directly, for example
bindings.bind_button({input.keyboard_id(), CE::Input::KeyboardKey::Escape}, quit).
The same form accepts mouse buttons and gamepad controls, including in chords.
Previous interface |
Current use |
|---|---|
|
Pass |
|
Use the scoped |
|
Use |
|
Access |
Remove includes of the deleted glfw-bindings.h and input-mapper.h; include
<cheryl/core/controls/button-codes.h> alongside the input interface. These
removed interfaces have no compatibility aliases. Direct foreign-enum bindings
fail at compile time; numeric casts of Gainput/GLFW constants do not produce
Engine control IDs. Keep raw ControlId values for explicitly defined adapter
extensions. The binding task and
control guide
show the current headers, validation and examples.