Vulkan/Surface: Add implicit conversion to VkSurfaceKHR

Former-commit-id: 83bd6ba118a3d5c3c2ea136b6cc0a0011d1d4c3d
This commit is contained in:
Lynix 2016-04-30 11:42:24 +02:00
parent 3bcde868ef
commit 0b725e1090
2 changed files with 8 additions and 1 deletions

View File

@ -71,6 +71,8 @@ namespace Nz
Surface& operator=(const Surface&) = delete;
Surface& operator=(Surface&&) = delete;
inline operator VkSurfaceKHR();
private:
inline bool Create(const VkAllocationCallbacks* allocator);
@ -84,4 +86,4 @@ namespace Nz
#include <Nazara/Vulkan/VkSurface.inl>
#endif // Surface
#endif // NAZARA_VULKAN_VKSURFACE_HPP

View File

@ -202,6 +202,11 @@ namespace Nz
return false;
}
inline Surface::operator VkSurfaceKHR()
{
return m_surface;
}
inline bool Surface::Create(const VkAllocationCallbacks* allocator)
{
if (m_lastErrorCode != VkResult::VK_SUCCESS)