Editor
The cross-platform editor (#13)
Design for a new Primal editor written in C++ on Dear ImGui, running inside the engine on Windows and Linux (and
macOS once the engine has a Metal backend). It replaces the WPF editor (PrimalEditor/) after it reaches parity.
Written 2026-11-24; replaces the Avalonia plan of the same day, which was never started.
1. Intent
People other than the user will install the editor and make their own games with it, on Windows and Linux, and ship those games to several platforms. The WPF editor runs only on Windows. Ported C# toolkits were evaluated and rejected (section 4). The editor becomes a Primal program, as Unreal's, Unity's and Godot's editors are programs on their own engines: the viewport is an engine view, the editor runs wherever the engine runs, and packaging the editor is the same work as packaging a game.
2. Goals, non-goals, anti-goals
Goals:
- An editor in C++ (
Editor/) that linksPrimalEnginedirectly, with Dear ImGui (docking branch) behind a thin editor-widget layer of our own, so the UI library can be replaced later (RmlUi or own widgets) without touching the panels' logic. - Parity with the WPF editor: project browser and templates, world editor (outliner, details, viewport, transform gizmos), content browser and import, asset editors (geometry, texture, material), prefab editing, New Class, build and run, log panel, undo/redo.
- Projects and assets open in both editors while they live side by side (section 3).
- Game projects build on Linux (CMake) and Windows (MSBuild); asset import runs in-process through ContentTools.
- Installable packages for the editor on Windows and Linux.
Non-goals (now):
- macOS (follows a Metal backend), consoles.
- Play-in-editor (the game runs as its own process, as today; designed for, built later).
- A visual redesign. The layout follows today's editor.
- Accessibility beyond what ImGui gives (screen readers): a known limit of the choice, revisit if users need it.
Anti-goals (a failure even if it works):
- Editor code in the engine library that shipped games carry (the editor is its own target; engine hooks it needs are small and named).
- Panels calling ImGui directly everywhere (the replaceable-UI goal would be lost).
- Breaking the WPF editor on Windows before the new one reaches parity.
3. Decisions (user, 2026-11-24)
- The editor is C++ in the engine, not C# on Avalonia or Uno: Avalonia puts features behind a paywall and supports Arch only commercially; Uno was ruled out; Qt is LGPL, not MIT.
- Dear ImGui behind our own widget layer (not a retained-mode UI from scratch, not RmlUi first).
- Side by side: the WPF editor keeps working on Windows until the new one reaches parity; then it and EngineDLL's editor API are retired (a separate decision at that point).
- Same files in both editors: the new editor reads and writes the WPF editor's
project XML (
DataContractSerializer) and asset binaries, so any project opens in either. Format changes go into both editors while both live. - The WPF editor is frozen: bug fixes only; new features go into the new editor.
- C++, not a C# ImGui binding (ImGui.NET / Hexa.NET.ImGui, section 4).
4. Approaches considered
- Avalonia 12 (C#): keeps the C# models and tests. Rejected: paid tiers for DevTools, hot reload, packaging and the current TreeDataGrid; Arch is Tier 3; the viewport is a hosted native child window (fragile under Wayland).
- Uno Platform (C#, Apache 2.0): free hot reload, documented
X11NativeWindowhosting. Rejected by the user. - Qt 6 (C++): mature, used by O3DE, CryEngine Sandbox and Source 2's Hammer. Rejected: LGPL, a heavy dependency, the viewport is still a hosted window.
- ImGui.NET or Hexa.NET.ImGui (C#): keeps the C# models, serialization and tests, so parity comes sooner and the
file compatibility is free. Rejected: ImGui.NET's last release is 1.91.6.1 (January 2025); Hexa.NET.ImGui is
maintained but marked experimental; the binding's own native ImGui and the engine's renderer must agree on one
version or copy the draw data across the C ABI every frame; every engine feature the editor uses needs an EngineDLL
export and a C# wrapper forever; the editor ships a .NET runtime (
DataContractSerializerdoesn't suit NativeAOT); users need a C++ toolchain for game code anyway. Cheaper to parity, dearer for every feature after it. - Own retained-mode UI from scratch (Slate, Godot's Control nodes): most control, years before parity.
- RmlUi (MIT, HTML/CSS-like, rendered by the engine): easier to polish than ImGui; a smaller tool ecosystem. Stays the upgrade path behind the widget layer.
- Dear ImGui in the engine (chosen): MIT, the standard for engine tools, docking, a large ecosystem (ImGuizmo for gizmos). Weak at styling, IME and accessibility.
5. Architecture
5.1 Targets and layers
Editor/(new): the editor programPrimalEditor(CMake and.vcxproj; the WPF one keeps its name and output folderx64/<Config>Editor/, so they don't collide). LinksPrimalEngine,ContentTools(static) and the shader compiler library (EngineDLL's compiler code moves into a static library both use).- Inside
Editor/, three layers, checked byTools/check_layers.py:- Model (no ImGui): project, scenes, actors, assets, selection, undo stack, the asset database, build service.
Unit-tested in
UnitTests/(or anEditorTestsexecutable). - Widgets (
ui::): the only code that includesimgui.h: docking host, trees, property editors from reflection, asset tiles, dialogs, gizmos. A later UI library replaces this layer. - Panels: outliner, details, viewport, content browser, log, asset editors. They use the model and
ui::, never ImGui directly.
- Model (no ImGui): project, scenes, actors, assets, selection, undo stack, the asset database, build service.
Unit-tested in
- The engine gets only general features the editor needs (offscreen views, the ImGui render pass, game library loading); they are engine API, not editor code.
- Our panels use the same extension points users will (user, 2026-11-24): panels, menu items and (later)
inspectors, gizmos and importers register themselves in registries the editor draws from; nothing is a hard-coded
list. User editor extensions (Unity's
Editorfolders: an editor-only library in the game project, built and reloaded like the game library, never shipped with the game) come later, on those registries and theui::layer (issue #83).
5.2 Main loop and threads
One loop on the main thread: platform events → ImGui frame (panels) → apply queued model changes → graphics:: render_frame() with the editor's views and the ImGui pass. The editor runs no game frames (as today), so actors don't
begin play. Import, thumbnail baking and builds run as jobs or child processes and report back through a queue read
at the top of the loop.
5.3 Rendering
- An ImGui render pass in the engine, one HLSL shader in
Engine/Graphics/Shaders, on both backends, drawing ImGui's draw lists after the scene passes. Textures are bindless ids, so ImGui images can show any engine texture. Not the officialimgui_impl_vulkan/imgui_impl_dx12backends: they want their own descriptor pools and pipeline setup next to the engine's. - Viewports are offscreen views (render-to-texture), drawn as an ImGui image in a docked panel. This needs a
renderer feature: a view with its own render targets and camera but no swapchain, rendered in the same
render_frame()as the surfaces. It also gives the geometry and material previews and the asset thumbnails (offscreen render + readback), which replace WPF 3D. - No native child windows: the parented-window work of the Avalonia plan is dropped.
- Multi-viewport (panels torn out into OS windows) comes later and only where the platform allows (not on Wayland, which has no global window positions).
5.4 Platform, input and text
- The engine's platform layer (SDL3 on Linux, Win32 on Windows) feeds ImGui: one ImGui platform adapter of our own
on the engine's window and input events, so both OSes behave the same. Text input and IME through SDL3 text input
on Linux and
WM_CHAR/IME messages on Windows. - Clipboard, file dialogs (XDG portal on Linux), message boxes and OS drag-and-drop of files: SDL3 on Linux, Win32 on
Windows, behind
platform::functions. - Fonts: ImGui's dynamic fonts with FreeType (crisp text, scaling); per-monitor DPI scale (#15 folds into this).
5.5 Files and compatibility
- The WPF editor writes projects and scenes with
DataContractSerializer(XML withz:Id/z:Ref) and assets with its own binary layouts (Asset.cs,Geometry.cs,Texture.cs,Material.cs,Prefab.cs). The new editor reads and writes the same files (section 3), with pugixml for the XML; round-trip tests use files the WPF editor wrote. - The engine-side formats (
game.binv5, packed assets, shader packs, prefab assetsPPFB) are already C++ and are shared as they are. - C# code that packs assets for the engine (
PackForEngine()) is ported to C++ in the asset model, with unit tests that compare against files the WPF editor wrote.
5.6 Editing
- Undo/redo as commands on the model (set field, add/remove actor, reparent, add part/behavior, rename), merged
while a drag lasts. Field edits go through the reflection registry (
reflect::find_type()), so the details panel edits any reflected class or component without per-type code. 64-bit fields stay integers. - Selection is model state; panels observe it.
- Gizmos: ImGuizmo (MIT), wrapped in
ui::.
5.7 Game code and builds
- The editor loads the game library itself (
LoadLibrary/dlopenin aplatform::helper, aroundreflect::begin_library_load()/end_library_load()), the logic EngineDLL has today, moved into the engine or the editor model. - A build service with two implementations: MSBuild (Windows;
VisualStudio.CommandLine.csported) and CMake + Ninja (Linux, and Windows later). No Visual Studio COM automation. "Open in IDE" launches VS Code or Visual Studio as a program, apart from the build service (#16). - Project templates get a CMake project next to the MSVC one. New Class writes the file and adds it to the build
file (
CMakeLists.txtor.vcxproj). - Users need a C++ toolchain to build game code. The editor detects it (MSVC Build Tools on Windows, clang or GCC + CMake + Ninja on Linux) and says what's missing instead of failing in the build log.
5.8 Packaging
- The editor: CPack — a zip and an installer (WiX or NSIS) on Windows; a
.tar.gzand an AppImage on Linux (Flatpak later: its sandbox makes building game code harder). The package carries the engine library, ContentTools, the shader compiler (DXC), the engine shaders, the reflection generator, the default assets and templates. - Games ("export"): later step: the game executable,
PrimalEngine, game library or static build (#60),game.bin, packed content and shaders, per target OS. Designed for now (the build service and asset packer write to a staging folder), built after parity.
5.9 Dependencies
Downloaded and pinned like doctest and ufbx (cmake/PrimalDependencies.cmake + a .targets file for MSBuild):
Dear ImGui (docking branch, pinned to a commit or tag), ImGuizmo (pinned commit), FreeType (system package on Linux,
downloaded on Windows). pugixml (MIT) for the WPF editor's XML.
5.10 Testing
- The model layer: unit tests (doctest), including file round trips against files the WPF editor wrote.
- The widgets and panels: a headless smoke test that runs ImGui frames without a window (ImGui works with no backend) over a test project, checking that every panel draws without asserting.
- The ImGui pass and offscreen views: GraphicsTests cases (validation clean on both backends).
- Dear ImGui Test Engine is not used (its licence isn't MIT).
6. Order of work
Each step ends with the verification standard of CLAUDE.md (and the VM for Windows).
- ImGui in the engine: dependency download, the ImGui render pass on both backends, the platform adapter, a
GraphicsTests case and an EngineTest variant (
EDITOR_UI) showing the demo window. - Offscreen views: a view without a swapchain, rendered in
render_frame(), shown as an ImGui image; readback for thumbnails. GraphicsTests cases. - Editor shell:
Editor/with the three layers, the docking layout, log panel (the engine's ring buffer), project browser (open/new from templates), opening a project and its scenes read-only, the viewport with the editor camera. - Editing: outliner, details from reflection, gizmos, undo/redo, save.
- Content: content browser, import through ContentTools in-process, thumbnails, the asset packer in C++.
- Game code: loading the game library, New Class, the build service (CMake + MSBuild), Run, toolchain detection.
- Asset editors and prefabs: geometry, texture, material editors; prefab editing.
- Packaging: CPack packages for the editor on both OSes; CI builds them.
- Parity review with the user; then retiring the WPF editor and EngineDLL's editor API (separate decision); game export after that.
7. What changes elsewhere
- The "Editor (AvaloniaUI) compatibility constraints" in
Docs/LinuxVulkanPort.mdandDocs/Preferences.md(C ABI with UTF-8 strings, view models free of WPF types for the C# tests, injectable input,-fPIC) are kept only while the WPF editor lives; the opaque-handle and-fPICrules stay useful. - #78 (C# statics into instances, DI) and the "plain view-model library" part of #61 stop: the WPF editor is frozen.
- #15 (HiDPI) folds into step 1/3; #16 (IDE plugins) keeps the build/run split of 5.7.
- Issue #13's body is rewritten to this plan; the steps become sub-issues or a checklist there.
8. Left to the builder
- The widget layer's exact API, the docking layout, colours (today's dark theme as a start).
- How the ImGui pass gets its font atlas and dynamic font textures into the engine's content (texture updates).
- Toolchain detection details, the CPack generators' options.
- Test cases per step.
9. Progress
Step 1, Dear ImGui in the engine: done in the code (2026-11-24)
Plan: Docs/plans/2026-11-24-editor-step1-imgui.md. Desktop check: plan doc A59.
- Dependency: Dear ImGui
v1.93.0-docking, downloaded and pinned by SHA-256 (cmake/PrimalDependencies.cmake,Editor/UI/ImGui.targets).Editor/UI/ImGuiConfig.h: no obsolete API,ImTextureID_Invalidis -1 (engine texture id 0 is valid), 32-bitImWchar(emoji and rare CJK in text input). - Renderer:
graphics::UiDrawData(Engine/Graphics/UiDrawData.h) onSurfaceFrame::ui: textured, vertex-colored triangles with a clip rectangle each, in pixels, drawn over the back buffer after post-processing. It knows nothing about ImGui, so games can use it later (#82).UiPass.hlslpulls 16-bit indices and vertices from buffers in the frame's constant buffer (no input layout), converts the sRGB vertex colors to linear and alpha-blends. Vulkan: one pipeline per back buffer format, per-command constants as a root CBV. D3D12: one PSO, root constants. Both rebuild ongraphics::reload_shaders(). - Platform:
WindowEventgainsmouse_move,mouse_button_down/up,mouse_wheel,mouse_left,text_input(UTF-8, only betweenWindow::start_text_input()andstop_text_input()),focus_gained/lost; plusplatform::set_cursor(),set_clipboard_text()/clipboard_text()andWindow::display_scale(). Positions are pixels on both OSes. Win32 tracks the mouse leaving every window and captures the mouse while a button is held. - ImGui backend:
Editor/UI/ImGuiBackend.h(editor::ui::imgui_backend): events intoImGuiIO, ImGui's textures as engine textures (an update re-creates the whole texture; the renderer releases the old one after the frames in flight), draw data converted toUiDrawData(vertex offsets kept, so lists over 65,536 vertices work). - Tests: UnitTests suite
editor_ui(no GPU); GraphicsTests suites "ui pass" (clip rects outside the surface, vertex offsets, two surfaces and resizes, shader reload, the ImGui demo, atlas re-creation) and "platform::Window input". EngineTest variantEDITOR_UI(presetlinux-debug-editor-ui,PRIMAL_TEST_FRAMES=<n>to stop after n frames). - Findings: ImGui trickles its input queue (a key pressed with a click arrives a frame later), so tests that feed
both run two frames. In the VM,
Invoke-Interactivewithexe 2>&1 | Out-Filehangs after the program ends;Start-Process -RedirectStandard*works.
Step 2, offscreen views and theme v1: design (user, 2026-11-24)
Plan: Docs/plans/2026-11-24-editor-step2-offscreen-views.md.
- Offscreen surfaces are surfaces (not a separate view type):
graphics::create_offscreen_surface(width, height)returns aSurfacethatresize(),remove_surface()andrender_frame()treat like a window's. It keeps its own gpass targets, light culling and camera; instead of a swapchain image, post-processing and the UI pass write into its own RGBA16F texture (the back buffers' format on both backends, so a viewport looks like the game window, HDR included), which ends the frame readable by shaders. Rejected: a separateRenderViewtype (it duplicates the surface code on both backends). - Shown through the UI pass:
UiDrawCommand::surface_idsamples a surface's picture instead of a content texture; the renderer looks up the surface's current texture when it records (a resize can't leave a stale one).imgui_backend::surface_image(Surface)gives ImGui an id for it. Offscreen surfaces come first in therender_frame()span, so a window's UI shows this frame's picture. - Readback (thumbnails later):
graphics::request_readback(SurfaceId, callback)copies the picture after the frame and calls back from a laterrender_frame(), once the GPU has finished it (no waits). RGBA16F pixels, withgraphics::to_rgba8_srgb()for 8-bit images. - Theme v1 (user: "improve the styling as we go",
Docs/Preferences.md): Inter 4.1 (SIL OFL 1.1) at 15 px, Lucide 1.79.0 icons (ISC) merged into it with IconFontCppHeaders'IconsLucide.h(zlib), downloaded and pinned; the font files and their licenses are copied tox64/<Config>/fonts/.editor::ui::load_fonts()andapply_theme(): more padding and spacing, light rounding, neutral dark grays with a desaturated blue accent. - EngineTest
EDITOR_UIgets a "Viewport" panel showing an offscreen surface, and the theme.
Step 2 done (2026-11-24, uncommitted; plan doc A60)
- Engine:
graphics::create_offscreen_surface()/is_offscreen_surface()(Renderer.h); on Vulkan the surface owns aVulkanRenderTexture(RGBA16F, cleared at creation through an upload context), on D3D12 aD3D12RenderTexturecleared by the next frame (D3D12's upload queue is a copy queue). No acquire, present or flush on resize (the old texture goes through the deferred releases).UiDrawCommand::surface_idis resolved at record time (core::offscreen_surface_srv()); a removed surface, a window surface or the surface being drawn is skipped. - Readback:
graphics::request_readback()+Graphics/Readback.h(ReadbackImage,readback_callback,to_rgba8_srgb());math::half_to_float()/float_to_half(). The copy goes into a host-readable buffer after the surface's UI pass; the callback runs at the end of therender_frame()whose frame index comes round again, after that frame is submitted (no waits; it may remove or resize surfaces). Removing the surface drops its requests. - Known limits (review, 2026-11-24): surface ids have no generation, so a UI built before a removal may show the
picture of a new surface that got the same id, for one frame; D3D12 doesn't skip an offscreen surface whose texture
failed to recreate; a failed D3D12 readback
Mapisn't logged; a Vulkan resize clears through a synchronous upload each frame while a viewport is dragged. - Editor UI:
imgui_backend::surface_image()(bit 63 of theImTextureIDmarks a surface);Editor/UI/Theme.*(load_fonts(),fonts(),apply_theme(),warning_color). Inter 4.1, Lucide 1.79.0 andIconsLucide.hare downloaded and pinned (cmake/PrimalDependencies.cmake,Editor/UI/ImGui.targets); the fonts and licenses are copied tox64/<Config>/fonts/(CMake targetEditorUIFonts, MSBuild targetCopyEditorFonts). - EDITOR_UI test: a "Viewport" window docked in the middle shows an offscreen surface with a moving quad; the theme and icons are on.
- Tests: GraphicsTests "offscreen surface" (8 cases, incl. a readback pixel check), UnitTests "readback", the half float case in "math", three theme cases and the surface image case in "editor_ui".
- Found on the way:
header_checkdidn't linkEditorUI, soEngineTest/TestEditorUi.h(step 1) failed it; it now linksEditorUIand checksEditor/headers too.
Step 3, the editor shell: design (user, 2026-11-24)
Intent. The first PrimalEditor a person can start: pick or create a project, see its scenes' structure, look
around a scene with an editor camera, and read the log. Nothing is edited or saved yet (step 4), no meshes are drawn
(step 5), no game code is loaded (step 6). It sets up the three layers every later step adds to.
Decided (user, 2026-11-24):
-
The viewport shows structure only: a ground grid, the editor camera, and a small axis marker at each part (the selected actor's highlighted). Meshes come with step 5's asset work. Rejected: reading geometry and material assets now (step 5 pulled forward), stand-in cubes.
-
Grid and markers are an ImGui overlay: the viewport panel projects them with the editor camera and draws 2D lines over the viewport image (
ImDrawListthroughui::), the way step 4's gizmos (ImGuizmo) will draw. Rejected for now: a debug-line pass in the engine (both backends, depth-tested; reusable for games later, its own ticket if wanted). Limit: lines aren't hidden by geometry, which doesn't matter without meshes. -
Actors are plain data in the editor's model (user, 2026-11-24): opening a project reads the XML into editor objects; only the editor camera is an engine entity (in
game_entity::world(), the world the renderer reads). From step 5 the editor creates entities for mesh and light parts from its model, one direction only; the model stays the source of truth (as the WPF editor's C# objects are). Rejected: spawning every actor into the engine on open (edits would go through the engine, and game-code actor classes can't spawn before step 6).
Goals.
PrimalEditor(Editor/, CMake andEditor/Editor.vcxproj, sincePrimalEditoris the WPF project's name inPrimal.slnx; outputx64/<Config>/PrimalEditor[.exe], apart from the WPF editor'sx64/<Config>Editor/), built in the Debug and Release configurations like EngineTest, on both OSes and both backends.- Layers (section 5.1), checked by
Tools/check_layers.py:Editor/Model/(no ImGui),Editor/UI/(ui::, the only code that includesimgui.h; today'sEditorUIlibrary grows into it),Editor/Panels/, and the program (Editor/App/: main loop, docking host, panel registry). - Project browser (a window at start, and File > Open/New): recent projects, open a
.primalfile through a file dialog, new project from a template (name, location, template list with icon and screenshot). - Opening a project: its scenes in the outliner (each scene a node; the active one expanded), actors and their part trees, read-only. Selecting an actor in the outliner highlights its markers.
- Viewport panel: step 2's offscreen surface, the overlay, the editor camera (below). It shows the active scene only (one active scene, as in the WPF editor); double-clicking a scene in the outliner makes it active. Selecting an actor of another scene selects it without moving the camera (F does nothing then).
- Log panel: the engine's ring buffer (
log::read_recent()), with level and category filters, text search, clear, and follow-the-end scrolling. - The layout is a default dock layout (outliner left, viewport middle, log bottom) built in code on first run;
ImGui's
imgui.inikeeps the user's changes (in the per-user editor folder below). - Theme v1 and fonts from step 2; the display scale on start and when it changes.
Non-goals (this step). Editing, saving scenes or projects, undo, the details panel (step 4); meshes, content browser, import (step 5); game code, builds, New Class, Run (step 6); CMake project templates (step 6; a project made on Linux has the MSVC files only, as the WPF editor writes them).
Anti-goals. Writing a project or scene file (a read-only step must never change a user's files; only a new
project is written); panels calling ImGui directly; editor code in PrimalEngine.
Files (section 5.5).
- Project (
<name>.primal) and scene XML as the WPF editor writes them (DataContractSerializer:z:Id/z:Ref,i:type), read with pugixml (downloaded and pinned like ImGui). Element names come from the C#DataMembers inPrimalEditor/GameProject/Project.cs,Scene.cs,Components/Actor.cs,GameEntity.cs,Transform.cs,ReflectedComponent.cs.z:Refresolves through an id table (parts'Parent, actors'ParentScene). - The project folder is the
.primalfile's folder, never the XML'sPath(a Windows path on projects made there). - Old scenes' plain entities (
GameEntities) are dropped with one warning per scene, as the WPF editor does. - The model keeps what the shell shows: project name and path, scenes (name, active,
AddsDefaultLight), actors (guid, name, class, prefab name, enabled, attached-to), parts (guid, name, class, parent, transform), behaviors (type name). Reflected field values are kept as text for step 4. World transforms of parts are computed in the model (parent chain, thenAttachedTo), withmath::. - Recent projects: the WPF editor's
ProjectData.xml(ProjectDataListofProjectData: name, path, date), in the per-user editor folder:%APPDATA%\PrimalEditor\on Windows (shared with the WPF editor),$XDG_CONFIG_HOME/ PrimalEditor/(default~/.config/PrimalEditor/) on Linux. Opening or creating a project updates it (this file is the editor's own, so writing it is fine). Missing projects are listed greyed out, not deleted from the file. Entries are written exactly as the WPF editor writes them (ProjectPathwith a trailing separator, so itsFullPath= path + name +.primalworks); the WPF editor drops missing entries when it saves, which is accepted. - New project: what
NewProject.csCreateProject()does: the template's folders,.Primal/Icon.pngandScreenshot.png(hidden folder on Windows),project.primalwith{0}= name and{1}= path, the.slnandGameCode/<name>.vcxprojwith fresh GUIDs and$(PRIMAL_ENGINE)paths. Default location:Documents/PrimalProjects/(the user's documents folder; XDG on Linux). Refuses an existing non-empty folder and invalid names (the WPF rules). - Templates stay in
PrimalEditor/Resources/ProjectTemplates/(one source for both editors) and are copied next to the program (x64/<Config>/ProjectTemplates/) at build time, like the fonts.
Editor camera. An entity with render::Camera and a transform in the editor's world (no actor; the editor runs no
frames, so it is moved directly between frames). Orbit around a focus point (Alt + left drag, or middle drag), pan
(Shift + middle drag), zoom (wheel, toward the focus), fly (right drag + WASD/QE, Shift faster, wheel changes fly
speed), F frames the selected actor. Only while the viewport is hovered or being dragged. Per-scene camera state isn't
saved yet.
Engine additions (general, not editor code). File dialogs behind platform:: (open file with filters, choose
folder): SDL3's dialogs on Linux (portal), IFileOpenDialog on Windows; asynchronous, the result delivered on the main
thread. The user's documents and config folders (platform:: helpers). Nothing else is expected; anything more is
named in the plan.
Testing (section 5.10).
- Model unit tests (doctest,
UnitTests/or anEditorTestsexecutable): readingproject.primalfrom each template (placeholders filled), a scene with actors, parts, attachments and behaviors written by the WPF editor (fixture inUnitTests/Data/, made with the WPF editor in the VM), an old plain-entity scene (dropped with a warning), recent projects round trip and aProjectData.xmlwritten by the WPF editor, new-project creation into a temporary folder (files, substitutions, refusals), world transforms (hierarchy and attachment), the camera's math (orbit, pan, zoom, fly, framing). - A headless panel smoke test in
UnitTests/(no window, no GPU): every panel over the fixture project for a few frames, no asserts; without a renderer the viewport panel has no surface and its image draws nothing (step 2's invalid-surface rule), the overlay still draws. - The program: an EngineTest-style run with a frame limit (
PRIMAL_EDITOR_FRAMES) opening the fixture project, both backends, validation clean; the VM for Windows.
Panel and menu registry (user, 2026-11-24): the editor's own panels and menu items register themselves (title, draw function, menu path) and the shell draws what is registered, the path users' panels will take later.
Calls made while writing this (2026-11-24, check them): the .vcxproj name and configurations, the smoke test
without a GPU, the active-scene rule, recent-project compatibility (above).
Left to the builder. Folder and file names inside the layers; the ui:: API needed for these panels (tree, table,
text filter, splitter, image, overlay lines, menu bar, modal); how the program is wired to frame/jobs; marker size
and colours (theme); the exact recent-project list and new-project dialog layout (follow the WPF editor's).