Implement quick shader switch hotkeys

This commit is contained in:
Dynamitos
2024-05-23 14:58:14 +02:00
parent 8399b176bb
commit e0961bce24
20 changed files with 160 additions and 110 deletions
+3 -3
View File
@@ -114,7 +114,7 @@ void Window::pollInput()
void Window::beginFrame()
{
imageAvailableFences[currentSemaphoreIndex]->wait(100000);
imageAvailableFences[currentSemaphoreIndex]->wait(100000000);
imageAvailableFences[currentSemaphoreIndex]->reset();
vkAcquireNextImageKHR(graphics->getDevice(), swapchain, std::numeric_limits<uint64>::max(), imageAvailableSemaphores[currentSemaphoreIndex]->getHandle(), imageAvailableFences[currentSemaphoreIndex]->getHandle(), &currentImageIndex);
graphics->getGraphicsCommands()->getCommands()->waitForSemaphore(VK_PIPELINE_STAGE_COLOR_ATTACHMENT_OUTPUT_BIT, imageAvailableSemaphores[currentSemaphoreIndex]);
@@ -284,14 +284,14 @@ void Window::chooseSwapSurfaceFormat()
void Window::chooseSwapPresentMode()
{
/*for (const auto& supportedPresentMode : supportedPresentModes)
for (const auto& supportedPresentMode : supportedPresentModes)
{
if (supportedPresentMode == VK_PRESENT_MODE_MAILBOX_KHR)
{
presentMode = supportedPresentMode;
return;
}
}*/
}
presentMode = VK_PRESENT_MODE_FIFO_KHR;
}