Lugdunum
0.1.0
include
lug
Graphics
Vulkan
API
Buffer.hpp
Go to the documentation of this file.
1
#pragma once
2
3
#include <memory>
4
5
#include <
lug/Graphics/Export.hpp
>
6
#include <
lug/Graphics/Vulkan/Vulkan.hpp
>
7
8
namespace
lug
{
9
namespace
Graphics {
10
namespace
Vulkan
{
11
namespace
API {
12
13
namespace
Builder {
14
class
Buffer
;
15
}
// Builder
16
17
class
CommandBuffer
;
18
class
Device
;
19
class
DeviceMemory
;
20
21
class
LUG_GRAPHICS_API
Buffer
{
22
friend
class
Builder::Buffer
;
23
24
public
:
25
Buffer
() =
default
;
26
27
Buffer
(
const
Buffer
&) =
delete
;
28
Buffer
(
Buffer
&& buffer);
29
30
Buffer
& operator=(
const
Buffer
&) =
delete
;
31
Buffer
& operator=(
Buffer
&& buffer);
32
33
~
Buffer
();
34
35
explicit
operator
VkBuffer()
const
{
36
return
_buffer;
37
}
38
39
void
destroy();
40
41
void
bindMemory(
const
DeviceMemory
& deviceMemory, VkDeviceSize memoryOffset = 0);
42
43
bool
updateData(
const
void
*data, VkDeviceSize size, VkDeviceSize offset = 0)
const
;
44
45
const
VkMemoryRequirements& getRequirements()
const
;
46
const
DeviceMemory
* getDeviceMemory()
const
;
47
VkDeviceSize getDeviceMemoryOffset()
const
;
48
49
private
:
50
explicit
Buffer
(VkBuffer
Buffer
,
const
Device
* device);
51
52
private
:
53
VkBuffer _buffer{VK_NULL_HANDLE};
54
const
Device
* _device{
nullptr
};
55
56
const
DeviceMemory
* _deviceMemory{
nullptr
};
57
VkDeviceSize _deviceMemoryOffset{0};
58
59
VkMemoryRequirements _requirements{};
60
};
61
62
#include <
lug/Graphics/Vulkan/API/Buffer.inl
>
63
64
}
// API
65
}
// Vulkan
66
}
// Graphics
67
}
// lug
LUG_GRAPHICS_API
#define LUG_GRAPHICS_API
Definition:
Export.hpp:11
lug::Graphics::Vulkan::API::Builder::Device
Definition:
Device.hpp:15
Vulkan
Definition:
Vulkan.hpp:155
lug::Graphics::Vulkan::API::Device
Definition:
Device.hpp:16
lug::Graphics::Vulkan::API::Builder::Buffer
Definition:
Buffer.hpp:17
Buffer.inl
lug::Graphics::Vulkan::API::DeviceMemory
Definition:
DeviceMemory.hpp:19
Vulkan.hpp
lug::Graphics::Vulkan::API::Builder::CommandBuffer
Definition:
CommandBuffer.hpp:18
lug::Graphics::Vulkan::API::Builder::DeviceMemory
Definition:
DeviceMemory.hpp:19
lug
Definition:
Application.hpp:11
Export.hpp
lug::Graphics::Vulkan::API::Buffer
Definition:
Buffer.hpp:21
Generated by
1.8.13