Lugdunum  0.1.0
Chunk.hpp
Go to the documentation of this file.
1 #pragma once
2 
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>
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:
35 
36  std::array<SubBuffer, subBufferPerChunk> _subBuffers;
37 };
38 
40 
41 } // BufferPool
42 } // Render
43 } // Vulkan
44 } // Graphics
45 } // lug
#define LUG_GRAPHICS_API
Definition: Export.hpp:11
std::array< SubBuffer, subBufferPerChunk > _subBuffers
Definition: Chunk.hpp:36