Skip to content

Headless backend: second BackendApi implementation + platform-neutral contract#5

Merged
Sunrisepeak merged 1 commit into
mainfrom
feat/headless-backend
Jun 3, 2026
Merged

Headless backend: second BackendApi implementation + platform-neutral contract#5
Sunrisepeak merged 1 commit into
mainfrom
feat/headless-backend

Conversation

@Sunrisepeak
Copy link
Copy Markdown
Member

Adds imgui.backend.headless — a second, display-free implementation of the BackendApi contract, making backend-swap (I3) real with two backends today (sdl3 stays planned, unblocked by the same mechanism). Contract lifecycle names become platform-neutral (InitPlatform/TerminatePlatform); Glfw-flavored aliases retained. backend_swap_test executes the identical templated loop on Headless and compile-instantiates it for GlfwOpenGL3. Pairs with mcpp's backend="<impl>" dep knob (mcpp#109).

Adds imgui.backend.headless: a display-free backend satisfying the same
compile-time contract as GlfwOpenGL3 (CI smoke / logic tests / servers).
The contract's lifecycle names become platform-neutral (InitPlatform/
TerminatePlatform) — exposed by having a second implementation; the
Glfw-flavored spellings remain as aliases on GlfwOpenGL3.

backend_swap_test runs the SAME templated application loop against Headless
(executed, 3 frames render) and compile-instantiates it for GlfwOpenGL3 —
proving backend swap = one import + one alias with the loop untouched (I3).
@Sunrisepeak Sunrisepeak merged commit ad375b3 into main Jun 3, 2026
3 checks passed
@Sunrisepeak Sunrisepeak deleted the feat/headless-backend branch June 3, 2026 17:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants