Correct extension handling

I had missed a critical bit from the cookbook.
This commit is contained in:
Bill Currie 2019-07-10 13:16:46 +09:00
parent ed3c5cb9ec
commit 2771e9c573
7 changed files with 91 additions and 42 deletions

View file

@ -6,11 +6,14 @@
#endif
#include <vulkan/vulkan.h>
struct VulkanInstance_s;
typedef struct vulkan_ctx_s {
void (*load_vulkan) (struct vulkan_ctx_s *ctx);
void (*unload_vulkan) (struct vulkan_ctx_s *ctx);
const char **required_extensions;
int (*extension_enabled) (struct VulkanInstance_s *inst,
const char *ext);
struct vulkan_presentation_s *presentation;
int (*get_presentation_support) (struct vulkan_ctx_s *ctx,
VkPhysicalDevice physicalDevice,
@ -22,6 +25,7 @@ typedef struct vulkan_ctx_s {
struct VulkanInstance_s *vtx;
struct VulkanDevice_s *dev;
VkInstance instance;
VkPhysicalDevice physDevice;
VkDevice device;
#define EXPORTED_VULKAN_FUNCTION(fname) PFN_##fname fname;
#define GLOBAL_LEVEL_VULKAN_FUNCTION(fname) PFN_##fname fname;