Lugdunum  0.1.0
Surface.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 Surface;
13 } // Builder
14 
15 class Instance;
16 
17 class Surface {
18  friend class Builder::Surface;
19 
20 public:
21  Surface() = default;
22 
23  Surface(const Surface&) = delete;
24  Surface(Surface&& surface);
25 
26  Surface& operator=(const Surface&) = delete;
27  Surface& operator=(Surface&& surface);
28 
29  ~Surface();
30 
31  explicit operator VkSurfaceKHR() const {
32  return _surface;
33  }
34 
35  void destroy();
36 
37 private:
38  explicit Surface(VkSurfaceKHR surface, const Instance* instance);
39 
40 private:
41  VkSurfaceKHR _surface{VK_NULL_HANDLE};
42  const Instance* _instance{nullptr};
43 };
44 
45 } // API
46 } // Vulkan
47 } // Graphics
48 } // lug
Surface(const API::Instance &instance)
Definition: Surface.cpp:11
Surface & operator=(const Surface &)=delete