BRE12
CommandListManager.h
1 #pragma once
2 
3 #include <d3d12.h>
4 #include <mutex>
5 #include <tbb/concurrent_unordered_set.h>
6 
7 namespace BRE {
8 // To create/get command lists
10 public:
11  CommandListManager() = delete;
12  ~CommandListManager() = delete;
13  CommandListManager(const CommandListManager&) = delete;
14  const CommandListManager& operator=(const CommandListManager&) = delete;
16  CommandListManager& operator=(CommandListManager&&) = delete;
17 
18  static void EraseAll() noexcept;
19 
20  static ID3D12GraphicsCommandList& CreateCommandList(
21  const D3D12_COMMAND_LIST_TYPE& commandListType,
22  ID3D12CommandAllocator& commandAllocator) noexcept;
23 
24 private:
26  static CommandLists mCommandLists;
27 
28  static std::mutex mMutex;
29 };
30 
31 }
Definition: Camera.cpp:8
Definition: concurrent_unordered_set.h:58
Definition: CommandListManager.h:9