fix rendering pipeline when drawable has no indices

This commit is contained in:
ohyzha
2024-07-18 14:45:59 +03:00
parent 5e7cf1ba90
commit 60c139b5ba

View File

@@ -52,7 +52,8 @@ namespace OpenVulkano::Vulkan
void RecordDraw(vk::CommandBuffer& cmdBuffer)
{
cmdBuffer.drawIndexed(m_geometry->GetIndexCount(), 1, 0, 0, 0);
if (m_geometry->GetIndexCount()) { cmdBuffer.drawIndexed(m_geometry->GetIndexCount(), 1, 0, 0, 0); }
else { cmdBuffer.draw(m_geometry->GetVertexCount(), 1, 0, 0); }
}
void Close() override