Lugdunum  0.1.0
RenderPass.cpp
Go to the documentation of this file.
5 
6 namespace lug {
7 namespace Graphics {
8 namespace Vulkan {
9 namespace API {
10 
11 RenderPass::RenderPass(VkRenderPass renderPass, const Device* device) : _renderPass(renderPass), _device(device) {}
12 
14  _renderPass = renderPass._renderPass;
15  _device = renderPass._device;
16  renderPass._renderPass = VK_NULL_HANDLE;
17  renderPass._device = nullptr;
18 }
19 
21  destroy();
22 
23  _renderPass = renderPass._renderPass;
24  _device = renderPass._device;
25  renderPass._renderPass = VK_NULL_HANDLE;
26  renderPass._device = nullptr;
27 
28  return *this;
29 }
30 
32  destroy();
33 }
34 
36  if (_renderPass != VK_NULL_HANDLE) {
37  vkDestroyRenderPass(static_cast<VkDevice>(*_device), _renderPass, nullptr);
38  _renderPass = VK_NULL_HANDLE;
39  }
40 }
41 
42 } // API
43 } // Vulkan
44 } // Graphics
45 } // lug
RenderPass & operator=(const RenderPass &)=delete