Lugdunum
0.1.0
include
lug
Graphics
Vulkan
Render
BufferPool
Chunk.hpp
Go to the documentation of this file.
1
#pragma once
2
3
#include <
lug/Graphics/Export.hpp
>
4
#include <
lug/Graphics/Vulkan/API/Builder/Buffer.hpp
>
5
#include <
lug/Graphics/Vulkan/API/Builder/DeviceMemory.hpp
>
6
#include <
lug/Graphics/Vulkan/Render/BufferPool/SubBuffer.hpp
>
7
#include <
lug/Graphics/Vulkan/Renderer.hpp
>
8
9
namespace
lug
{
10
namespace
Graphics {
11
namespace
Vulkan
{
12
namespace
Render {
13
namespace
BufferPool {
14
15
template
<
size_t
subBufferPerChunk,
size_t
subBufferSize>
16
class
LUG_GRAPHICS_API
Chunk
{
17
public
:
18
Chunk
() =
default
;
19
20
Chunk
(
const
Chunk
&) =
delete
;
21
Chunk
(
Chunk
&&) =
delete
;
22
23
Chunk
& operator=(
const
Chunk
&) =
delete
;
24
Chunk
& operator=(
Chunk
&&) =
delete
;
25
26
~
Chunk
() =
default
;
27
28
bool
init(
Renderer
& renderer, std::set<uint32_t> queueFamilyIndices);
29
30
SubBuffer
* getFreeSubBuffer();
31
32
private
:
33
API::DeviceMemory
_bufferMemory
;
34
API::Buffer
_buffer
;
35
36
std::array<SubBuffer, subBufferPerChunk>
_subBuffers
;
37
};
38
39
#include <
lug/Graphics/Vulkan/Render/BufferPool/Chunk.inl
>
40
41
}
// BufferPool
42
}
// Render
43
}
// Vulkan
44
}
// Graphics
45
}
// lug
lug::Graphics::Vulkan::Render::BufferPool::Chunk::_buffer
API::Buffer _buffer
Definition:
Chunk.hpp:34
lug::Graphics::Vulkan::Render::BufferPool::Chunk
Definition:
Chunk.hpp:16
LUG_GRAPHICS_API
#define LUG_GRAPHICS_API
Definition:
Export.hpp:11
Chunk.inl
Vulkan
Definition:
Vulkan.hpp:155
lug::Graphics::Vulkan::API::DeviceMemory
Definition:
DeviceMemory.hpp:19
Renderer.hpp
lug
Definition:
Application.hpp:11
DeviceMemory.hpp
lug::Graphics::Vulkan::Render::BufferPool::Chunk::_bufferMemory
API::DeviceMemory _bufferMemory
Definition:
Chunk.hpp:33
lug::Graphics::Vulkan::Render::BufferPool::Chunk::_subBuffers
std::array< SubBuffer, subBufferPerChunk > _subBuffers
Definition:
Chunk.hpp:36
SubBuffer.hpp
lug::Graphics::Vulkan::Renderer
Definition:
Renderer.hpp:21
Export.hpp
Buffer.hpp
lug::Graphics::Vulkan::API::Buffer
Definition:
Buffer.hpp:21
lug::Graphics::Vulkan::Render::BufferPool::SubBuffer
Definition:
SubBuffer.hpp:25
Generated by
1.8.13