Lugdunum  0.1.0
CommandPool.hpp
Go to the documentation of this file.
1 #pragma once
2 
3 #include <memory>
4 
6 
7 namespace lug {
8 namespace Graphics {
9 namespace Vulkan {
10 namespace API {
11 
12 class Device;
13 class QueueFamily;
14 
15 namespace Builder {
16 
17 class CommandPool {
18 public:
19  CommandPool(const API::Device& device, const API::QueueFamily& queueFamily);
20 
21  CommandPool(const CommandPool&) = delete;
22  CommandPool(CommandPool&&) = delete;
23 
24  CommandPool& operator=(const CommandPool&) = delete;
25  CommandPool& operator=(CommandPool&&) = delete;
26 
27  ~CommandPool() = default;
28 
29  // Setters
30  void setFlags(VkCommandPoolCreateFlags flags);
31 
32  // Build methods
33  bool build(API::CommandPool& instance, VkResult* returnResult = nullptr);
34  std::unique_ptr<API::CommandPool> build(VkResult* returnResult = nullptr);
35 
36 private:
38 
40  VkCommandPoolCreateFlags _flags{VK_COMMAND_POOL_CREATE_RESET_COMMAND_BUFFER_BIT};
41 };
42 
44 
45 } // Builder
46 } // API
47 } // Vulkan
48 } // Graphics
49 } // lug
bool build(API::CommandPool &instance, VkResult *returnResult=nullptr)
Definition: CommandPool.cpp:13
void setFlags(VkCommandPoolCreateFlags flags)
Definition: CommandPool.inl:1
CommandPool & operator=(const CommandPool &)=delete
CommandPool(const API::Device &device, const API::QueueFamily &queueFamily)
Definition: CommandPool.cpp:11