Lugdunum
0.1.0
include
lug
Graphics
Vulkan
Render
BufferPool
SubBuffer.hpp
Go to the documentation of this file.
1
#pragma once
2
3
#include <cstdint>
4
#include <cstdlib>
5
6
#include <
lug/Graphics/Export.hpp
>
7
8
namespace
lug
{
9
namespace
Graphics {
10
namespace
Vulkan
{
11
12
namespace
API {
13
class
Buffer;
14
}
// API
15
16
namespace
Render {
17
namespace
BufferPool {
18
19
template
<
size_t
subBufferPerChunk,
size_t
subBufferSize>
20
class
BufferPool;
21
22
template
<
size_t
subBufferPerChunk,
size_t
subBufferSize>
23
class
Chunk;
24
25
class
LUG_GRAPHICS_API
SubBuffer
{
26
template
<
size_t
subBufferPerChunk,
size_t
subBufferSize>
27
friend
class
BufferPool
;
28
29
template
<
size_t
subBufferPerChunk,
size_t
subBufferSize>
30
friend
class
Chunk
;
31
32
public
:
33
SubBuffer
() =
default
;
34
SubBuffer
(
const
API::Buffer
* buffer, uint32_t offset, uint32_t size);
35
36
SubBuffer
(
const
SubBuffer
&) =
delete
;
37
SubBuffer
(
SubBuffer
&&) =
default
;
38
39
SubBuffer
& operator=(
const
SubBuffer
&) =
delete
;
40
SubBuffer
& operator=(
SubBuffer
&&) =
default
;
41
42
~
SubBuffer
() =
default
;
43
44
const
API::Buffer
* getBuffer()
const
;
45
uint32_t getOffset()
const
;
46
uint32_t getSize()
const
;
47
48
size_t
getHash()
const
;
49
void
setHash(
size_t
hash);
50
51
private
:
52
const
API::Buffer
* _buffer{
nullptr
};
53
uint32_t _offset{0};
54
uint32_t _size{0};
55
56
size_t
_hash{0};
57
uint32_t _referenceCount{0};
58
};
59
60
#include <
lug/Graphics/Vulkan/Render/BufferPool/SubBuffer.inl
>
61
62
}
// BufferPool
63
}
// Render
64
}
// Vulkan
65
}
// Graphics
66
}
// lug
SubBuffer.inl
lug::Graphics::Vulkan::Render::BufferPool::Chunk
Definition:
Chunk.hpp:16
LUG_GRAPHICS_API
#define LUG_GRAPHICS_API
Definition:
Export.hpp:11
Vulkan
Definition:
Vulkan.hpp:155
lug
Definition:
Application.hpp:11
Export.hpp
lug::Graphics::Vulkan::API::Buffer
Definition:
Buffer.hpp:21
lug::Graphics::Vulkan::Render::BufferPool::SubBuffer
Definition:
SubBuffer.hpp:25
lug::Graphics::Vulkan::Render::BufferPool::BufferPool
Definition:
BufferPool.hpp:20
Generated by
1.8.13