extern "C" so that I can also use c++
[vkrt] / src / main.c
index eb1cf18..af4277c 100644 (file)
@@ -33,7 +33,7 @@ display(void);
 static GLFWwindow *win;
 static bool redraw_pending;
 
-static bool vk_enable_layers;
+static bool vk_enable_layers = true;
 
 static int win_w = 800;
 static int win_h = 600;
@@ -154,7 +154,7 @@ init(void)
     if (!vk_fill_image_props(&vk_core,
                              win_w, win_h, 1,
                              1, 1, 1,
-                             VK_FORMAT_D24_UNORM_S8_UINT,
+                             VK_FORMAT_D32_SFLOAT_S8_UINT,
                              VK_IMAGE_TILING_OPTIMAL,
                              VK_IMAGE_LAYOUT_UNDEFINED,
                              VK_IMAGE_LAYOUT_DEPTH_STENCIL_ATTACHMENT_OPTIMAL,
@@ -262,8 +262,8 @@ cleanup(void)
     }
 
     vk_destroy_image(&vk_core, &vk_depth_att.obj);
-    vk_destroy_renderer(&vk_core, &vk_rnd);
     vk_destroy_semaphores(&vk_core, &vk_sema);
+    vk_destroy_renderer(&vk_core, &vk_rnd);
 
     if (vk_chain.swapchain) {
         vk_destroy_swapchain(&vk_core, &vk_chain);