diff test1.nim @ 1201:d4a206b5e5b0 compiletime-tests

add: rest of the cleanup stuff
author sam <sam@basx.dev>
date Sun, 14 Jul 2024 21:30:52 +0700
parents 5c6491f28dcd
children a8864fe6fe6e
line wrap: on
line diff
--- a/test1.nim	Sun Jul 14 19:15:43 2024 +0700
+++ b/test1.nim	Sun Jul 14 21:30:52 2024 +0700
@@ -117,12 +117,21 @@
   WithNextFrame(swapchain, framebuffer, commandbuffer):
     WithRenderPass(mainRenderpass, framebuffer, commandbuffer, swapchain.width, swapchain.height, NewVec4f(1, 0, 0, 0)):
       vkCmdBindPipeline(commandbuffer, VK_PIPELINE_BIND_POINT_GRAPHICS, pipeline1.vk)
+
+      Render(
+        commandbuffer = commandbuffer,
+        pipeline = pipeline1,
+        globalSet = myGlobals,
+        materialSet = uniforms1,
+        mesh = myMesh1,
+        instances = instances1,
+      )
       echo (getMonoTime() - t).inMicroseconds.float / 1000.0
       t = getMonoTime()
 
+checkVkResult vkDeviceWaitIdle(vulkan.device)
 DestroyPipeline(pipeline1)
-
+vkDestroyRenderPass(vulkan.device, mainRenderpass, nil)
 DestroyRenderData(renderdata)
-checkVkResult vkDeviceWaitIdle(vulkan.device)
 DestroySwapchain(swapchain)
 DestroyVulkan()