Lugdunum  0.1.0
Instance.cpp
Go to the documentation of this file.
2 
3 namespace lug {
4 namespace Graphics {
5 namespace Vulkan {
6 namespace API {
7 
8 Instance::Instance(VkInstance instance) : _instance(instance) {}
9 
11  _instance = instance._instance;
12  instance._instance = VK_NULL_HANDLE;
13 }
14 
16  destroy();
17 
18  _instance = instance._instance;
19  instance._instance = VK_NULL_HANDLE;
20 
21  return *this;
22 }
23 
25  destroy();
26 }
27 
29  if (_instance != VK_NULL_HANDLE) {
30  vkDestroyInstance(_instance, nullptr);
31  _instance = VK_NULL_HANDLE;
32  }
33 }
34 
35 } // API
36 } // Vulkan
37 } // Graphics
38 } // lug
Instance & operator=(const Instance &)=delete