Vulkan/Swapchain: Fix compilation
Former-commit-id: 9ab7e69c0b9f61793d334410eb630487e08bcba6
This commit is contained in:
parent
cede56fa27
commit
e1382845b4
|
|
@ -16,6 +16,8 @@ namespace Nz
|
||||||
{
|
{
|
||||||
class Swapchain : public DeviceObject<Swapchain, VkSwapchainKHR, VkSwapchainCreateInfoKHR>
|
class Swapchain : public DeviceObject<Swapchain, VkSwapchainKHR, VkSwapchainCreateInfoKHR>
|
||||||
{
|
{
|
||||||
|
friend DeviceObject;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
inline Swapchain(Device& instance);
|
inline Swapchain(Device& instance);
|
||||||
Swapchain(const Swapchain&) = delete;
|
Swapchain(const Swapchain&) = delete;
|
||||||
|
|
@ -26,6 +28,10 @@ namespace Nz
|
||||||
|
|
||||||
Swapchain& operator=(const Swapchain&) = delete;
|
Swapchain& operator=(const Swapchain&) = delete;
|
||||||
Swapchain& operator=(Swapchain&&) = delete;
|
Swapchain& operator=(Swapchain&&) = delete;
|
||||||
|
|
||||||
|
private:
|
||||||
|
static VkResult CreateHelper(Device& device, const VkSwapchainCreateInfoKHR* createInfo, const VkAllocationCallbacks* allocator, VkSwapchainKHR* handle);
|
||||||
|
static void DestroyHelper(Device& device, VkSwapchainKHR handle, const VkAllocationCallbacks* allocator);
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -21,6 +21,16 @@ namespace Nz
|
||||||
if (!m_device.IsExtensionLoaded("VK_KHR_swapchain"))
|
if (!m_device.IsExtensionLoaded("VK_KHR_swapchain"))
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
VkResult Swapchain::CreateHelper(Device& device, const VkSwapchainCreateInfoKHR* createInfo, const VkAllocationCallbacks* allocator, VkSwapchainKHR* handle)
|
||||||
|
{
|
||||||
|
return device.vkCreateSwapchainKHR(device, createInfo, allocator, handle);
|
||||||
|
}
|
||||||
|
|
||||||
|
void Swapchain::DestroyHelper(Device& device, VkSwapchainKHR handle, const VkAllocationCallbacks* allocator)
|
||||||
|
{
|
||||||
|
return device.vkDestroySwapchainKHR(device, handle, allocator);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue