Added RenderCmdBuffer::Draw(const VertexInputData *)

This commit is contained in:
2024-04-26 00:41:53 +08:00
parent 9c6c37c07a
commit a1bf9336a3
4 changed files with 13 additions and 6 deletions

View File

@@ -183,4 +183,12 @@ void RenderCmdBuffer::DrawIndexedIndirect( VkBuffer buffer,
for(uint32_t i=0;i<drawCount;i++)
vkCmdDrawIndexedIndirect(cmd_buf,buffer,offset+i*stride,1,stride);
}
void RenderCmdBuffer::Draw(const VertexInputData *vid)
{
if (vid->ib_access->buffer)
DrawIndexed(vid->ib_access->buffer->GetCount());
else
Draw(vid->vertex_count);
}
VK_NAMESPACE_END