Skip to content

Viewport Render Target

date: 06/27/2026

Today I added the foundation for the Anvil editor viewport.

Instead of rendering directly to the swapchain, the scene now renders into an offscreen render target. The editor can display that target inside an ImGui viewport panel.

  • Added viewport render target support
  • Created an editor viewport panel
  • Rendered the scene into an ImGui image
  • Began separating editor UI from renderer ownership

This is a major step toward a real editor workflow. The viewport is now just another panel, which means future tools like gizmos, camera controls, scene picking, and play mode can build on top of it.

  • Add viewport focus/hover detection
  • Route input only when the viewport is active
  • Add entity selection from the viewport
  • Improve draw layer and rotation support