Dear ImGui in the engine #39

Open
UnflavoredMeson/Primal_Plus_Plus
opened 2026-11-24 20:16:00 +00:00 by UnflavoredMeson · 0 comments
Owner

Why

The editor is C++ on Dear ImGui inside the engine. ImGui needs input events, text input, the clipboard and the display scale from the platform, and draws through S6-08's UI pass.

Decided

  • Dear ImGui, docking branch, downloaded and pinned (v1.93.0-docking), MIT. Only behind the editor's own ui:: layer (S7-02).
  • The platform adds pointer, text, focus, cursor, clipboard and display-scale events on both OSes.
  • The ImGui backend lives in Editor/UI/; an EDITOR_UI EngineTest shows ImGui's demo window (PRIMAL_TEST_FRAMES=<n> stops it).
  • Avalonia (paid features, commercial-only Arch support), Uno, Qt (LGPL) and C# ImGui bindings were rejected (Editor section 4).

Read first

Steps

  • 1. Add the platform events with UnitTests for their translation.
  • 2. Write the ImGui platform adapter and renderer backend on the UI pass.
  • 3. Run the demo window on both OSes and both backends.

Done when

  • EDITOR_UI runs on Linux and Windows, D3D12 and Vulkan, with text input and the clipboard working (you check); validation clean; 0 warnings; tidy 0.

Claude can help with

  • ImGui backend details (texture ids, the font atlas, multi-viewport is off).

Learn

  • What an immediate-mode GUI keeps between frames and what it rebuilds.
## Why The editor is C++ on Dear ImGui inside the engine. ImGui needs input events, text input, the clipboard and the display scale from the platform, and draws through S6-08's UI pass. ## Decided - Dear ImGui, docking branch, downloaded and pinned (`v1.93.0-docking`), MIT. Only behind the editor's own `ui::` layer (S7-02). - The platform adds pointer, text, focus, cursor, clipboard and display-scale events on both OSes. - The ImGui backend lives in `Editor/UI/`; an `EDITOR_UI` EngineTest shows ImGui's demo window (`PRIMAL_TEST_FRAMES=<n>` stops it). - Avalonia (paid features, commercial-only Arch support), Uno, Qt (LGPL) and C# ImGui bindings were rejected ([Editor](https://forgejo.unflavoredmeson.com/UnflavoredMeson/Primal_Plus_Plus/wiki/Editor) section 4). ## Read first - [Editor](https://forgejo.unflavoredmeson.com/UnflavoredMeson/Primal_Plus_Plus/wiki/Editor), sections 3-5 and 9; [Plan-2026-11-24-editor-step1-imgui](https://forgejo.unflavoredmeson.com/UnflavoredMeson/Primal_Plus_Plus/wiki/Plan-2026-11-24-editor-step1-imgui). ## Steps - [ ] 1. Add the platform events with UnitTests for their translation. - [ ] 2. Write the ImGui platform adapter and renderer backend on the UI pass. - [ ] 3. Run the demo window on both OSes and both backends. ## Done when - [ ] `EDITOR_UI` runs on Linux and Windows, D3D12 and Vulkan, with text input and the clipboard working (you check); validation clean; 0 warnings; tidy 0. ## Claude can help with - ImGui backend details (texture ids, the font atlas, multi-viewport is off). ## Learn - What an immediate-mode GUI keeps between frames and what it rebuilds.
Sign in to join this conversation.
No assignees
No project
No milestone
Blocks
#40 The ui:: widget layer and the theme
UnflavoredMeson/Primal_Plus_Plus
Depends on
#15 Display scale and HiDPI on both platforms
UnflavoredMeson/Primal_Plus_Plus
#37 UI pass, offscreen surfaces and readback
UnflavoredMeson/Primal_Plus_Plus
Notifications
1 participant
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
UnflavoredMeson/Primal_Plus_Plus#39
No description provided.