+ if(!glfwInit()) {
+ fprintf(stderr, "Failed to initialize GLFW.\n");
+ return false;
+ }
+
+ if(!glfwVulkanSupported()) {
+ fprintf(stderr, "No Vulkan support on the device.\n");
+ return false;
+ }
+
+ glfwSetErrorCallback(error_callback);
+
+ if(!vku_create_device()) {
+ fprintf(stderr, "Failed to initialize vulkan.\n");
+ return false;
+ }
+
+ if(!glfwGetPhysicalDevicePresentationSupport(vkinst, vkpdev, vkqfamily)) {
+ fprintf(stderr, "Presentation support not found.\n");
+ return false;
+ }
+
+ glfwWindowHint(GLFW_CLIENT_API, GLFW_NO_API);
+ if(!(win = glfwCreateWindow(win_w, win_h, "vkcow", 0, 0))) {
+ fprintf(stderr, "Failed to create window.\n");
+ return false;
+ }
+
+ if(VkResult err = glfwCreateWindowSurface(vkinst, win, 0, &vksurface)) {
+ fprintf(stderr, "Failed to create KHR surface: %s\n", vku_get_vulkan_error_str(err));
+ return false;
+ }
+
+ gfx_reshape = reshape;
+