Add XCUI native image UV support

This commit is contained in:
2026-04-05 14:16:53 +08:00
parent daa54e0230
commit 231df6ee36
6 changed files with 68 additions and 18 deletions

View File

@@ -193,6 +193,15 @@ public:
m_currentFrame.placeholderSubtitle);
}
if (m_currentFrame.showingSurfaceImage) {
EnsureOverlayDrawList().AddImage(
m_currentFrame.session.canvasRect,
m_currentFrame.surfaceImage.texture,
::XCEngine::UI::UIColor(1.0f, 1.0f, 1.0f, 1.0f),
m_currentFrame.surfaceImage.uvMin,
m_currentFrame.surfaceImage.uvMax);
}
if (request.drawPreviewFrame) {
DrawOutlineRect(
m_currentFrame.session.canvasRect,

View File

@@ -502,10 +502,10 @@ void XCUIRHICommandCompiler::Compile(
compiled = AppendClippedTexturedRect(
outCompiledDrawData.texturedVertices,
command.rect,
0.0f,
0.0f,
1.0f,
1.0f,
command.uvMin.x,
command.uvMin.y,
command.uvMax.x,
command.uvMax.y,
command.color,
currentClipRect);
if (compiled) {