Improve synchronization based on vulkan-tutorial

https://vulkan-tutorial.com/Drawing_a_triangle/Drawing/Rendering_and_presentation
This commit is contained in:
Lynix
2020-03-04 20:13:37 +01:00
parent 771355ec87
commit 9515f1c807
9 changed files with 94 additions and 79 deletions

View File

@@ -42,11 +42,11 @@ namespace Nz
return m_device;
}
inline void VkRenderWindow::Present(UInt32 imageIndex)
inline void VkRenderWindow::Present(UInt32 imageIndex, VkSemaphore waitSemaphore)
{
NazaraAssert(imageIndex < m_frameBuffers.size(), "Invalid image index");
m_presentQueue.Present(m_swapchain, imageIndex);
m_presentQueue.Present(m_swapchain, imageIndex, waitSemaphore);
}
}