How ImGui is integrated
The editor is a separate build target (src/editor/) that embeds the engine as a library. The Editor class owns an Engine instance, drives the main loop, and adds EditorLayer to the layer stack. EditorLayer implements OnImGuiRender(), which is called every frame between the engine’s render commands and Present.
ImGuiVulkanResourceManager. Viewport textures use a deferred deletion queue to avoid destroying GPU resources while they are still in flight.
Enabling the editor
PRISMA_ENABLE_IMGUI_DEBUG controls whether the ImGui UI is compiled in. It defaults to ON for debug configurations:
PRISMA_ENABLE_IMGUI_DEBUG only controls the ImGui overlay built into engine debug builds. The full editor target (PRISMA_BUILD_EDITOR) is a separate flag and is ON by default on Windows.Building the editor
Use theeditor-{platform}-{arch}-{config} CMake presets. The editor preset automatically enables Vulkan and ImGui:
- Windows
- Linux
Current editor features
The editor is under active development. The following panels are available:Editor architecture
1
Editor::Initialize()
Creates the SDL3 window, initializes the engine, sets up the ImGui Vulkan backend, and allocates the descriptor pool and sampler for viewport texture sampling.
2
Editor::Run()
Drives the main loop: polls SDL3 events via
OnEvent, calls OnUpdate, then OnRender (engine scene), then OnImGuiRender (editor panels), and finally presents.3
EditorLayer::OnImGuiRender()
Submits ImGui draw calls for the scene inspector, component panel, viewport image, and any active debug overlays. This is where you add new panels.
4
Editor::Shutdown()
Flushes the deferred deletion queue, destroys ImGui Vulkan resources, shuts down the engine, and destroys the SDL3 window.
Writing an editor extension
Useprisma_create_editor_extension() in your CMakeLists.txt to build a shared library that links against the editor target:
Editor, and exports EDITOR_EXTENSION_EXPORTS=1 so you can mark public symbols with __declspec(dllexport) / __attribute__((visibility("default"))) consistently.
A minimal panel implementation: