1 | //************************************ bs::framework - Copyright 2018 Marko Pintera **************************************// |
2 | //*********** Licensed under the MIT license. See LICENSE.md for full terms. This notice is not to be removed. ***********// |
3 | #pragma once |
4 | |
5 | #include "BsCorePrerequisites.h" |
6 | #include "Utility/BsModule.h" |
7 | |
8 | namespace bs { namespace ct |
9 | { |
10 | /** @addtogroup RenderAPI-Internal |
11 | * @{ |
12 | */ |
13 | |
14 | /** |
15 | * Handles creation of command buffers. See CommandBuffer. |
16 | * |
17 | * @note Core thread only. |
18 | */ |
19 | class BS_CORE_EXPORT CommandBufferManager : public Module<CommandBufferManager> |
20 | { |
21 | public: |
22 | virtual ~CommandBufferManager() = default; |
23 | |
24 | /** @copydoc CommandBuffer::create */ |
25 | SPtr<CommandBuffer> create(GpuQueueType type, UINT32 deviceIdx = 0, UINT32 queueIdx = 0, |
26 | bool secondary = false); |
27 | |
28 | protected: |
29 | friend CommandBuffer; |
30 | |
31 | /** Creates a command buffer with the specified ID. See create(). */ |
32 | virtual SPtr<CommandBuffer> createInternal(GpuQueueType type, UINT32 deviceIdx = 0, |
33 | UINT32 queueIdx = 0, bool secondary = false) = 0; |
34 | }; |
35 | |
36 | /** @} */ |
37 | }} |