Vulkan/Surface: Add implicit conversion to VkSurfaceKHR
Former-commit-id: 83bd6ba118a3d5c3c2ea136b6cc0a0011d1d4c3d
This commit is contained in:
parent
3bcde868ef
commit
0b725e1090
|
|
@ -71,6 +71,8 @@ namespace Nz
|
||||||
Surface& operator=(const Surface&) = delete;
|
Surface& operator=(const Surface&) = delete;
|
||||||
Surface& operator=(Surface&&) = delete;
|
Surface& operator=(Surface&&) = delete;
|
||||||
|
|
||||||
|
inline operator VkSurfaceKHR();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
inline bool Create(const VkAllocationCallbacks* allocator);
|
inline bool Create(const VkAllocationCallbacks* allocator);
|
||||||
|
|
||||||
|
|
@ -84,4 +86,4 @@ namespace Nz
|
||||||
|
|
||||||
#include <Nazara/Vulkan/VkSurface.inl>
|
#include <Nazara/Vulkan/VkSurface.inl>
|
||||||
|
|
||||||
#endif // Surface
|
#endif // NAZARA_VULKAN_VKSURFACE_HPP
|
||||||
|
|
|
||||||
|
|
@ -202,6 +202,11 @@ namespace Nz
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
inline Surface::operator VkSurfaceKHR()
|
||||||
|
{
|
||||||
|
return m_surface;
|
||||||
|
}
|
||||||
|
|
||||||
inline bool Surface::Create(const VkAllocationCallbacks* allocator)
|
inline bool Surface::Create(const VkAllocationCallbacks* allocator)
|
||||||
{
|
{
|
||||||
if (m_lastErrorCode != VkResult::VK_SUCCESS)
|
if (m_lastErrorCode != VkResult::VK_SUCCESS)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue