Вывод кадра на экран

This commit is contained in:
parent 03a7cb24f5
commit f1d7980c4e
1 changed files with 13 additions and 0 deletions

View File

@ -1065,4 +1065,17 @@ void Vulkan::renderFrame()
} }
currentFrame = (currentFrame + 1) % surface.imageCount; 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");
}
} }