mirror of
https://gitea.windcorp.ru/Wind-Corporation/Progressia.git
synced 2025-04-21 12:10:45 +03:00
imageIndexInFlight is now initialized properly
This commit is contained in:
parent
a110c9de03
commit
189d19fd4a
@ -49,6 +49,7 @@ bool Frame::startRender() {
|
|||||||
vkWaitForFences(vulkan.getDevice(), 1, &inFlightFence, VK_TRUE, UINT64_MAX);
|
vkWaitForFences(vulkan.getDevice(), 1, &inFlightFence, VK_TRUE, UINT64_MAX);
|
||||||
|
|
||||||
// Acquire an image
|
// Acquire an image
|
||||||
|
imageIndexInFlight = 0;
|
||||||
VkResult result = vkAcquireNextImageKHR(
|
VkResult result = vkAcquireNextImageKHR(
|
||||||
vulkan.getDevice(), vulkan.getSwapChain().getVk(), UINT64_MAX,
|
vulkan.getDevice(), vulkan.getSwapChain().getVk(), UINT64_MAX,
|
||||||
imageAvailableSemaphore, VK_NULL_HANDLE, &*imageIndexInFlight);
|
imageAvailableSemaphore, VK_NULL_HANDLE, &*imageIndexInFlight);
|
||||||
@ -163,6 +164,8 @@ void Frame::endRender() {
|
|||||||
} else {
|
} else {
|
||||||
vulkan.handleVkResult("Could not present", result);
|
vulkan.handleVkResult("Could not present", result);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
imageIndexInFlight.reset();
|
||||||
}
|
}
|
||||||
|
|
||||||
VkCommandBuffer Frame::getCommandBuffer() { return commandBuffer; }
|
VkCommandBuffer Frame::getCommandBuffer() { return commandBuffer; }
|
||||||
|
Loading…
x
Reference in New Issue
Block a user