Lugdunum
0.1.0
src
lug
Graphics
Vulkan
API
ImageView.cpp
Go to the documentation of this file.
1
#include <
lug/Graphics/Vulkan/API/ImageView.hpp
>
2
3
#include <
lug/Graphics/Vulkan/API/Device.hpp
>
4
5
namespace
lug
{
6
namespace
Graphics {
7
namespace
Vulkan
{
8
namespace
API {
9
10
ImageView::ImageView
(VkImageView imageView,
const
Device
* device,
const
Image
* image) : _imageView(imageView), _device(device), _image(image) {}
11
12
ImageView::ImageView
(
ImageView
&& imageView) {
13
_imageView
= imageView._imageView;
14
_device
= imageView.
_device
;
15
_image
= imageView.
_image
;
16
imageView._imageView = VK_NULL_HANDLE;
17
imageView._device =
nullptr
;
18
imageView._image =
nullptr
;
19
}
20
21
ImageView
&
ImageView::operator=
(
ImageView
&& imageView) {
22
destroy
();
23
24
_imageView
= imageView._imageView;
25
_device
= imageView.
_device
;
26
_image
= imageView.
_image
;
27
imageView._imageView = VK_NULL_HANDLE;
28
imageView._device =
nullptr
;
29
imageView._image =
nullptr
;
30
31
return
*
this
;
32
}
33
34
ImageView::~ImageView
() {
35
destroy
();
36
}
37
38
void
ImageView::destroy
() {
39
if
(
_imageView
!= VK_NULL_HANDLE) {
40
vkDestroyImageView(static_cast<VkDevice>(*
_device
),
_imageView
,
nullptr
);
41
_imageView
= VK_NULL_HANDLE;
42
_device
=
nullptr
;
43
_image
=
nullptr
;
44
}
45
}
46
47
}
// API
48
}
// Vulkan
49
}
// Graphics
50
}
// lug
lug::Graphics::Vulkan::API::ImageView::ImageView
ImageView()=default
Device.hpp
lug::Graphics::Vulkan::API::ImageView::_image
const Image * _image
Definition:
ImageView.hpp:59
ImageView.hpp
Vulkan
Definition:
Vulkan.hpp:155
lug::Graphics::Vulkan::API::Image::_image
VkImage _image
Definition:
Image.hpp:69
lug::Graphics::Vulkan::API::Device
Definition:
Device.hpp:16
lug::Graphics::Vulkan::API::ImageView::_device
const Device * _device
Definition:
ImageView.hpp:57
lug::Graphics::Vulkan::API::ImageView::destroy
void destroy()
Definition:
ImageView.cpp:38
lug::Graphics::Vulkan::API::ImageView
Definition:
ImageView.hpp:18
lug
Definition:
Application.hpp:11
lug::Graphics::Vulkan::API::ImageView::~ImageView
~ImageView()
Definition:
ImageView.cpp:34
lug::Graphics::Vulkan::API::ImageView::operator=
ImageView & operator=(const ImageView &)=delete
lug::Graphics::Vulkan::API::Device::_device
VkDevice _device
Definition:
Device.hpp:55
lug::Graphics::Vulkan::API::ImageView::_imageView
VkImageView _imageView
Definition:
ImageView.hpp:56
lug::Graphics::Vulkan::API::Image
Definition:
Image.hpp:21
Generated by
1.8.13