Вывод кадра на экран
This commit is contained in:
parent
03a7cb24f5
commit
f1d7980c4e
13
src/vk.cpp
13
src/vk.cpp
|
@ -1065,4 +1065,17 @@ void Vulkan::renderFrame()
|
|||
}
|
||||
|
||||
currentFrame = (currentFrame + 1) % surface.imageCount;
|
||||
|
||||
VkPresentInfoKHR presentInfo{};
|
||||
presentInfo.sType = VK_STRUCTURE_TYPE_PRESENT_INFO_KHR;
|
||||
presentInfo.waitSemaphoreCount = 1;
|
||||
presentInfo.pWaitSemaphores = signalSemaphores;
|
||||
presentInfo.swapchainCount = 1;
|
||||
presentInfo.pSwapchains = &swapChain;
|
||||
presentInfo.pImageIndices = &imageIndex;
|
||||
|
||||
if (vkQueuePresentKHR(queue.descriptor, &presentInfo) != VK_SUCCESS)
|
||||
{
|
||||
throw std::runtime_error("Unable to present swap chain image");
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue