diff src/semicongine/vulkan/swapchain.nim @ 590:1edf3e16144e

add: input handling, small refactoring for renderer
author Sam <sam@basx.dev>
date Tue, 18 Apr 2023 03:04:37 +0700
parents b434feaf2b67
children 11666d28e04d
line wrap: on
line diff
--- a/src/semicongine/vulkan/swapchain.nim	Mon Apr 17 18:02:19 2023 +0700
+++ b/src/semicongine/vulkan/swapchain.nim	Tue Apr 18 03:04:37 2023 +0700
@@ -122,6 +122,8 @@
     VkFence(0),
     addr(swapchain.currentFramebufferIndex)
   )
+  # TODO: resize swapchain on VK_SUBOPTIMAL_KHR
+  echo "HIIIIIIIIIIII next image result", nextImageResult
   if not (nextImageResult in [VK_SUCCESS, VK_TIMEOUT, VK_NOT_READY, VK_SUBOPTIMAL_KHR]):
     return
 
@@ -161,6 +163,8 @@
     pResults: nil,
   )
   let presentResult = vkQueuePresentKHR(swapchain.device.firstPresentationQueue().get().vk, addr(presentInfo))
+  # TODO: resize swapchain on VK_SUBOPTIMAL_KHR
+  echo "HIIIIIIIIIIII Present Result:", presentResult
   if not (presentResult in [VK_SUCCESS, VK_SUBOPTIMAL_KHR]):
     return false