Vulkan/Surface: Add missing implementation
Former-commit-id: ca6008f2c717aee8cea80805f9f5f0c6ed950c32
This commit is contained in:
parent
3d09177795
commit
5bd08501e9
|
|
@ -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,10 +119,15 @@ 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
|
||||||
{
|
{
|
||||||
if (!m_instance.IsExtensionLoaded("VK_KHR_surface"))
|
if (!m_instance.IsExtensionLoaded("VK_KHR_surface"))
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue