reworked begin and end

This commit is contained in:
2026-08-27 20:00:21 +03:00
parent a6818a6cf4
commit aaf298d8cc
10 changed files with 181 additions and 283 deletions
+15 -3
View File
@@ -313,14 +313,26 @@ void CKotUIBuffer::Draw( IImage *pImage )
m_pMaterial->PSSetTexture(2, m_pFont->GetAtlas());
m_pMaterial->PSSetSampler(3, m_pRenderContext->GetDefaultSampler());
pList->StartRecording();
pList->SetRenderTarget(0, pImage);
pList->SetLoadStoreModes(0, LOAD_MODE_LOAD, STORE_MODE_STORE);
pList->SetRenderResolution(pImage->GetImageWidth(), pImage->GetImageHeight());
RenderImage image = {};
image.pImage = pImage;
image.eLoadMode = LOAD_MODE_LOAD;
image.eStoreMode = STORE_MODE_STORE;
BeginInfo begin = {};
begin.uWidth = pImage->GetImageWidth();
begin.uHeight = pImage->GetImageHeight();
begin.pRenderImages = ℑ
begin.uRenderImageCount = 1;
pList->Begin(&begin);
pList->SetScissors(0, 0, begin.uWidth, begin.uHeight);
pList->SetViewport(0, 0, begin.uWidth, begin.uHeight, 0, 1);
pList->SetMaterial(m_pMaterial);
pList->SetVertexBuffer(0, s_pGlyphBuffer);
pList->DrawPrimitives(6, 0, uRealGlyphCount, 0);
pList->End();
pList->EndRecording();
m_pRenderContext->SubmitCommandList(pList);