Vulkan/VkInstance: Add IsValid() method

This commit is contained in:
Lynix 2016-10-28 22:18:41 +02:00
parent 1df3201b39
commit 5eefbdeb60
2 changed files with 6 additions and 0 deletions

View File

@ -45,6 +45,7 @@ namespace Nz
inline bool IsExtensionLoaded(const String& extensionName); inline bool IsExtensionLoaded(const String& extensionName);
inline bool IsLayerLoaded(const String& layerName); inline bool IsLayerLoaded(const String& layerName);
inline bool IsValid() const;
Instance& operator=(const Instance&) = delete; Instance& operator=(const Instance&) = delete;
Instance& operator=(Instance&&) = delete; Instance& operator=(Instance&&) = delete;

View File

@ -81,6 +81,11 @@ namespace Nz
return m_loadedLayers.count(layerName) > 0; return m_loadedLayers.count(layerName) > 0;
} }
inline bool Instance::IsValid() const
{
return m_instance != nullptr;
}
inline Instance::operator VkInstance() inline Instance::operator VkInstance()
{ {
return m_instance; return m_instance;