reworked begin and end
This commit is contained in:
+15
-3
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user