GPU/Vulkan: Use Metal layer instead NSView on macOS.

This commit is contained in:
Connor McLaughlin
2020-06-22 15:58:07 +10:00
parent f846817848
commit eaca5eca07
6 changed files with 90 additions and 12 deletions

View File

@ -21,7 +21,10 @@ public:
~SwapChain();
// Creates a vulkan-renderable surface for the specified window handle.
static VkSurfaceKHR CreateVulkanSurface(VkInstance instance, const WindowInfo& wi);
static VkSurfaceKHR CreateVulkanSurface(VkInstance instance, WindowInfo& wi);
// Destroys a previously-created surface.
static void DestroyVulkanSurface(VkInstance instance, WindowInfo& wi, VkSurfaceKHR surface);
// Create a new swap chain from a pre-existing surface.
static std::unique_ptr<SwapChain> Create(const WindowInfo& wi, VkSurfaceKHR surface, bool vsync);