Caffeine

ImGui host (runtime and legacy plugins)

Reference Engine Legacy Last verified: Source: apps/runtime/ImGuiIntegration.hpp

Dear ImGui is no longer the Doppio editor UI. It remains the immediate-mode host for caffeine-runtime and the legacy C++ plugin SDK. The active editor is Rust/Iced.

Do not build new editor panels in ImGui. The Rust editor uses Iced components. ImGui panels are for the standalone runtime and plugins that still target the C++ SDK.

Two UI models#

ModelUsed byWhere
Retained, IcedDoppio editor: docking, hierarchy, inspector, viewport, assets, console, generatorsdoppio/crates/ui/
Immediate, Dear ImGuicaffeine-runtime, archived C++ Doppio, legacy pluginsapps/runtime/, include/caffeine/ui/, doppio-archived/
Retained game UIIn-game HUD and menussrc/caffeine/ui/, Game UI

Runtime integration#

apps/runtime/ImGuiIntegration.hpp owns the SDL3 + RHI ImGui backend used by the runtime executable:

  • init(window, device) — creates the ImGui context and backend data.
  • beginFrame() / endFrame(commandBuffer) — records the draw data into the RHI.
  • processEvent(SDL_Event) — forwards SDL input.
  • wantsKeyboard() / wantsMouse() — tells the runtime whether ImGui captured input.

The runtime draws its profiler, console and scene overlays through this host. The engine core (caffeine-core) has no ImGui dependency; the adapters live in caffeine-editor-support and the runtime.

UIKit for plugins#

C++ plugins draw with the public immediate-mode kit in include/caffeine/ui/:

Header Contents
UI.hpp Umbrella for the composable element kit
Widgets.hpp Buttons, property rows, section headers, empty states
Theme.hpp Palette and metrics
Icons.hpp Vector glyphs
PanelRegistry.hpp Stable panel ids and categories
Workspace.hpp JSON docking layout for the plugin host
Panel.hpp Panel descriptors

Plugin panels call Caffeine::UIKit and register through PanelRegistry; they do not link against Doppio internals. See Plugin SDK.

Profiler and console#

The profiler and console windows are runtime/legacy-editor tools. They consume Debug::Profiler and Debug::LogSystem data; the Rust editor has its own typed Console pane and does not embed ImGui.