diff test1.nim @ 1200:5c6491f28dcd compiletime-tests

did: simplify some swapchain stuff, add many destructor calls
author sam <sam@basx.dev>
date Sun, 14 Jul 2024 19:15:43 +0700
parents ba1af13233ee
children d4a206b5e5b0
line wrap: on
line diff
--- a/test1.nim	Sat Jul 13 23:27:12 2024 +0700
+++ b/test1.nim	Sun Jul 14 19:15:43 2024 +0700
@@ -116,5 +116,13 @@
 while UpdateInputs():
   WithNextFrame(swapchain, framebuffer, commandbuffer):
     WithRenderPass(mainRenderpass, framebuffer, commandbuffer, swapchain.width, swapchain.height, NewVec4f(1, 0, 0, 0)):
-      # echo (getMonoTime() - t).inMicroseconds.float / 1000.0
+      vkCmdBindPipeline(commandbuffer, VK_PIPELINE_BIND_POINT_GRAPHICS, pipeline1.vk)
+      echo (getMonoTime() - t).inMicroseconds.float / 1000.0
       t = getMonoTime()
+
+DestroyPipeline(pipeline1)
+
+DestroyRenderData(renderdata)
+checkVkResult vkDeviceWaitIdle(vulkan.device)
+DestroySwapchain(swapchain)
+DestroyVulkan()