fix 0 size vulkan index buffers

This commit is contained in:
ohyzha
2024-07-22 13:04:47 +03:00
parent 6ed4136393
commit fd9697aac6
2 changed files with 4 additions and 3 deletions

View File

@@ -47,7 +47,7 @@ namespace OpenVulkano::Vulkan
void RecordBind(vk::CommandBuffer& cmdBuffer)
{
cmdBuffer.bindVertexBuffers(0, 1, &m_vertexBuffer->buffer, &m_offsets);
cmdBuffer.bindIndexBuffer(m_indexBuffer->buffer, 0, m_indexType);
if (m_indexBuffer) { cmdBuffer.bindIndexBuffer(m_indexBuffer->buffer, 0, m_indexType); }
}
void RecordDraw(vk::CommandBuffer& cmdBuffer)