Lugdunum
0.1.0
src
lug
Graphics
Vulkan
API
RenderPass.cpp
Go to the documentation of this file.
1
#include <
lug/Graphics/Vulkan/API/RenderPass.hpp
>
2
#include <
lug/Graphics/Vulkan/API/Device.hpp
>
3
#include <
lug/Graphics/Vulkan/API/Image.hpp
>
4
#include <
lug/System/Logger/Logger.hpp
>
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
13
RenderPass::RenderPass
(
RenderPass
&& renderPass) {
14
_renderPass
= renderPass._renderPass;
15
_device
= renderPass.
_device
;
16
renderPass._renderPass = VK_NULL_HANDLE;
17
renderPass._device =
nullptr
;
18
}
19
20
RenderPass
&
RenderPass::operator=
(
RenderPass
&& renderPass) {
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
31
RenderPass::~RenderPass
() {
32
destroy
();
33
}
34
35
void
RenderPass::destroy
() {
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
Device.hpp
Image.hpp
lug::Graphics::Vulkan::API::RenderPass
Definition:
RenderPass.hpp:21
Vulkan
Definition:
Vulkan.hpp:155
lug::Graphics::Vulkan::API::RenderPass::_device
const Device * _device
Definition:
RenderPass.hpp:46
Logger.hpp
lug::Graphics::Vulkan::API::RenderPass::operator=
RenderPass & operator=(const RenderPass &)=delete
lug::Graphics::Vulkan::API::Device
Definition:
Device.hpp:16
lug::Graphics::Vulkan::API::RenderPass::~RenderPass
~RenderPass()
Definition:
RenderPass.cpp:31
lug
Definition:
Application.hpp:11
lug::Graphics::Vulkan::API::Device::_device
VkDevice _device
Definition:
Device.hpp:55
lug::Graphics::Vulkan::API::RenderPass::RenderPass
RenderPass()=default
RenderPass.hpp
lug::Graphics::Vulkan::API::RenderPass::destroy
void destroy()
Definition:
RenderPass.cpp:35
lug::Graphics::Vulkan::API::RenderPass::_renderPass
VkRenderPass _renderPass
Definition:
RenderPass.hpp:45
Generated by
1.8.13