imgui

Dear ImGui

Specific best practices and architectural patterns when working with Dear ImGui.

Details

Language / Topic
cppC++
Category
framework

Rules

balanced
- Begin all frames strictly with `ImGui::NewFrame()` and strictly conclude with `ImGui::Render()`.
- Construct the UI layout strictly inside the rendering loop explicitly every frame in pure immediate mode methodology.
- Use `ImGui::PushID()` and `ImGui::PopID()` carefully to safely distinguish between structurally identical UI elements in loops.
- Keep business state strictly separated from UI logic — Dear ImGui should strictly read state dynamically and write back state seamlessly.