Add proper support for IndexType and uint32 indices

This commit is contained in:
SirLynix
2022-04-04 09:02:00 +02:00
parent 66ff6cfa81
commit 9d526741b9
34 changed files with 188 additions and 57 deletions

View File

@@ -169,6 +169,7 @@ namespace Nz
drawCall.firstIndex = 0;
drawCall.indexBuffer = currentIndexBuffer;
drawCall.indexCount = submesh.GetIndexCount();
drawCall.indexType = submesh.GetIndexType();
drawCall.renderPipeline = currentPipeline;
drawCall.scissorBox = currentScissorBox;
drawCall.shaderBinding = currentShaderBinding;
@@ -217,7 +218,7 @@ namespace Nz
if (currentIndexBuffer != drawData.indexBuffer)
{
commandBuffer.BindIndexBuffer(*drawData.indexBuffer);
commandBuffer.BindIndexBuffer(*drawData.indexBuffer, drawData.indexType);
currentIndexBuffer = drawData.indexBuffer;
}