Vulkan/Surface: Add missing implementation
Former-commit-id: ca6008f2c717aee8cea80805f9f5f0c6ed950c32
This commit is contained in:
@@ -13,7 +13,7 @@ namespace Nz
|
|||||||
{
|
{
|
||||||
inline Surface::Surface(Instance& instance) :
|
inline Surface::Surface(Instance& instance) :
|
||||||
m_instance(instance),
|
m_instance(instance),
|
||||||
m_surface(0)
|
m_surface(VK_NULL_HANDLE)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -119,9 +119,14 @@ namespace Nz
|
|||||||
|
|
||||||
inline void Surface::Destroy()
|
inline void Surface::Destroy()
|
||||||
{
|
{
|
||||||
if (m_surface)
|
if (m_surface != VK_NULL_HANDLE)
|
||||||
m_instance.vkDestroySurfaceKHR(m_instance, m_surface, (m_allocator.pfnAllocation) ? &m_allocator : nullptr);
|
m_instance.vkDestroySurfaceKHR(m_instance, m_surface, (m_allocator.pfnAllocation) ? &m_allocator : nullptr);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
inline VkResult Surface::GetLastErrorCode() const
|
||||||
|
{
|
||||||
|
return m_lastErrorCode;
|
||||||
|
}
|
||||||
|
|
||||||
inline bool Surface::IsSupported() const
|
inline bool Surface::IsSupported() const
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user