some device scoring heuristics
[vkray] / src / app.c
index 4d845c5..0dca609 100644 (file)
--- a/src/app.c
+++ b/src/app.c
@@ -1,11 +1,20 @@
+#include <stdio.h>
+#include <stdlib.h>
 #include "app.h"
 #include "vk.h"
 
 int app_init(void)
 {
-       if(vk_init() == -1) {
+       unsigned int flags;
+
+       if(vk_init(VKINIT_DEPTH | VKINIT_RAY, &flags) == -1) {
                return -1;
        }
+       if(!(flags & VKINIT_RAY)) {
+               fprintf(stderr, "Vulkan raytracing extensions not available\n");
+               /*vk_cleanup();
+               return -1;*/
+       }
        return 0;
 }
 
@@ -21,6 +30,9 @@ void app_display(void)
 
 void app_reshape(int x, int y)
 {
+       if(vk_reshape(x, y) == -1) {
+               abort();
+       }
 }
 
 void app_keyboard(int key, int press)