Lugdunum  0.1.0
Instance.hpp
Go to the documentation of this file.
1 #pragma once
2 
5 
6 namespace lug {
7 namespace Graphics {
8 namespace Vulkan {
9 namespace API {
10 
11 namespace Builder {
12 class Instance;
13 } // Builder
14 
16  friend class Builder::Instance;
17 
18 public:
19  Instance() = default;
20 
21  Instance(const Instance&) = delete;
22  Instance(Instance&& instance);
23 
24  Instance& operator=(const Instance&) = delete;
25  Instance& operator=(Instance&& instance);
26 
27  ~Instance();
28 
29  explicit operator VkInstance() const {
30  return _instance;
31  }
32 
33  template <typename Function>
34  Function getProcAddr(const char* name) const;
35 
36  void destroy();
37 
38 private:
39  explicit Instance(VkInstance instance);
40 
41 private:
42  VkInstance _instance{VK_NULL_HANDLE};
43 };
44 
46 
47 } // API
48 } // Vulkan
49 } // Graphics
50 } // lug
#define LUG_GRAPHICS_API
Definition: Export.hpp:11