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