quakeforge/include/vid_vulkan.h

39 lines
1.2 KiB
C
Raw Normal View History

#ifndef __vid_vulkan_h
#define __vid_vulkan_h
#ifndef VK_NO_PROTOTYPES
#define VK_NO_PROTOTYPES
#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,
uint32_t queueFamilyIndex);
void (*choose_visual) (struct vulkan_ctx_s *ctx);
void (*create_window) (struct vulkan_ctx_s *ctx);
VkSurfaceKHR (*create_surface) (struct vulkan_ctx_s *ctx);
struct VulkanInstance_s *vtx;
struct VulkanDevice_s *dev;
VkInstance instance;
VkPhysicalDevice physDevice;
VkDevice device;
2019-07-10 15:58:14 +00:00
VkSwapchainKHR swapchain;
int32_t numSwapchainImages;
VkImage *swapchainImages;
#define EXPORTED_VULKAN_FUNCTION(fname) PFN_##fname fname;
#define GLOBAL_LEVEL_VULKAN_FUNCTION(fname) PFN_##fname fname;
#include "QF/Vulkan/funclist.h"
} vulkan_ctx_t;
#endif//__vid_vulkan_h