Decouple editor render runtime factory

This commit is contained in:
2026-04-26 19:21:38 +08:00
parent caa54b7878
commit fa4fcbe95b
15 changed files with 120 additions and 46 deletions

View File

@@ -8,6 +8,7 @@
#include "Platform/Win32/Windowing/EditorWindowHostConfig.h"
#include "Platform/Win32/Windowing/EditorWindowHostRuntime.h"
#include "Platform/Win32/Windowing/EditorWindowMessageDispatcher.h"
#include "Rendering/D3D12/D3D12EditorWindowRenderRuntime.h"
#include "Support/EnvironmentFlags.h"
#include "Support/ExecutablePath.h"
@@ -144,9 +145,12 @@ bool Application::Initialize(HINSTANCE hInstance, int nCmdShow) {
hostConfig,
m_repoRoot,
m_editorContext->GetShellAsset().captureRootPath);
m_renderRuntimeFactory =
std::make_unique<Host::D3D12EditorWindowRenderRuntimeFactory>();
m_windowManager = std::make_unique<App::EditorWindowManager>(
*m_editorContext,
*m_windowSystem,
*m_renderRuntimeFactory,
*m_windowHostRuntime);
m_editorContext->SetExitRequestHandler([this]() {
@@ -223,6 +227,7 @@ void Application::Shutdown() {
m_windowManager->Shutdown();
m_windowManager.reset();
}
m_renderRuntimeFactory.reset();
m_windowHostRuntime.reset();
m_windowSystem.reset();