Tighten XCUI compositor texture registration

This commit is contained in:
2026-04-05 06:43:51 +08:00
parent a1b98abfbb
commit edf434aa03
7 changed files with 54 additions and 41 deletions

View File

@@ -57,16 +57,14 @@ private:
std::uint32_t height = 0;
::XCEngine::RHI::RHITexture* colorTexture = nullptr;
::XCEngine::RHI::RHIResourceView* colorView = nullptr;
D3D12_CPU_DESCRIPTOR_HANDLE imguiCpuHandle = {};
D3D12_GPU_DESCRIPTOR_HANDLE imguiGpuHandle = {};
ImTextureID imguiTextureId = {};
::XCEngine::Editor::XCUIBackend::UITextureRegistration textureRegistration = {};
::XCEngine::RHI::ResourceStates colorState = ::XCEngine::RHI::ResourceStates::Common;
bool IsReady() const {
return !debugName.empty() &&
colorTexture != nullptr &&
colorView != nullptr &&
imguiTextureId != ImTextureID{} &&
textureRegistration.IsValid() &&
width > 0u &&
height > 0u;
}