Split XCUI hosted preview ImGui presenter seam

This commit is contained in:
2026-04-05 06:34:15 +08:00
parent 6159eef3af
commit 9525053624
7 changed files with 142 additions and 83 deletions

View File

@@ -1,5 +1,6 @@
#include "Application.h"
#include "XCUIBackend/ImGuiXCUIHostedPreviewPresenter.h"
#include "XCUIBackend/ImGuiWindowUICompositor.h"
#include <XCEngine/Core/Asset/ResourceManager.h>
@@ -848,11 +849,14 @@ void Application::RenderQueuedHostedPreviews(
drainStats.renderedDrawListCount += overlayStats.drawListCount;
drainStats.renderedCommandCount += overlayStats.renderedCommandCount;
drainStats.skippedCommandCount += overlayStats.skippedCommandCount;
::XCEngine::UI::UITextureHandle previewTexture = {};
previewTexture.nativeHandle = static_cast<std::uintptr_t>(previewSurface.imguiTextureId);
previewTexture.width = previewSurface.width;
previewTexture.height = previewSurface.height;
previewTexture.kind = ::XCEngine::UI::UITextureHandleKind::ImGuiDescriptor;
m_hostedPreviewSurfaceRegistry.UpdateSurface(
queuedFrame.debugName,
previewSurface.imguiTextureId,
previewSurface.width,
previewSurface.height,
previewTexture,
::XCEngine::UI::UIRect(
0.0f,
0.0f,