Lugdunum
0.1.0
src
lug
Graphics
Vulkan
API
Instance.cpp
Go to the documentation of this file.
1
#include <
lug/Graphics/Vulkan/API/Instance.hpp
>
2
3
namespace
lug
{
4
namespace
Graphics {
5
namespace
Vulkan
{
6
namespace
API {
7
8
Instance::Instance
(VkInstance instance) : _instance(instance) {}
9
10
Instance::Instance
(
Instance
&& instance) {
11
_instance
= instance._instance;
12
instance._instance = VK_NULL_HANDLE;
13
}
14
15
Instance
&
Instance::operator=
(
Instance
&& instance) {
16
destroy
();
17
18
_instance
= instance._instance;
19
instance._instance = VK_NULL_HANDLE;
20
21
return
*
this
;
22
}
23
24
Instance::~Instance
() {
25
destroy
();
26
}
27
28
void
Instance::destroy
() {
29
if
(
_instance
!= VK_NULL_HANDLE) {
30
vkDestroyInstance(
_instance
,
nullptr
);
31
_instance
= VK_NULL_HANDLE;
32
}
33
}
34
35
}
// API
36
}
// Vulkan
37
}
// Graphics
38
}
// lug
lug::Graphics::Vulkan::API::Instance::~Instance
~Instance()
Definition:
Instance.cpp:24
lug::Graphics::Vulkan::API::Instance
Definition:
Instance.hpp:15
lug::Graphics::Vulkan::API::Instance::operator=
Instance & operator=(const Instance &)=delete
Vulkan
Definition:
Vulkan.hpp:155
lug::Graphics::Vulkan::API::Instance::_instance
VkInstance _instance
Definition:
Instance.hpp:42
lug
Definition:
Application.hpp:11
lug::Graphics::Vulkan::API::Instance::Instance
Instance()=default
Instance.hpp
lug::Graphics::Vulkan::API::Instance::destroy
void destroy()
Definition:
Instance.cpp:28
Generated by
1.8.13