Mercurial > games > semicongine
diff src/semicongine/vulkan/swapchain.nim @ 120:2780d9aad142
add: better mesh support, indexed mesh
author | Sam <sam@basx.dev> |
---|---|
date | Thu, 06 Apr 2023 00:30:56 +0700 |
parents | 056e08dfad10 |
children | 506090173619 |
line wrap: on
line diff
--- a/src/semicongine/vulkan/swapchain.nim Wed Apr 05 00:45:16 2023 +0700 +++ b/src/semicongine/vulkan/swapchain.nim Thu Apr 06 00:30:56 2023 +0700 @@ -170,7 +170,7 @@ pOffsets=offsets.toCPointer() ) if drawable.indexed: - commandBuffer.vkCmdBindIndexBuffer(drawable.indexBuffer.vk, VkDeviceSize(0), drawable.indexType) + commandBuffer.vkCmdBindIndexBuffer(drawable.indexBuffer.vk, VkDeviceSize(drawable.indexOffset), drawable.indexType) commandBuffer.vkCmdDrawIndexed( indexCount=drawable.elementCount, instanceCount=drawable.instanceCount,