#ifndef DEVICE_H #define DEVICE_H #include #include "common.h" typedef struct device { VkInstance instance; VkDebugUtilsMessengerEXT debug_messenger; VkPhysicalDevice physical_device; VkDevice logical_device; VkQueue graphics_queue; VkSurfaceKHR surface; } * device_t; typedef int (*surface_func_t)(VkInstance instance, VkSurfaceKHR *surface); struct device_info { char *name; uint32_t version; const char* const* extensions; uint32_t ext_count; surface_func_t surface_func; }; device_t device_create(struct device_info *info); void device_destroy(device_t device); #endif