BsCommandBufferManager.h 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. //********************************** Banshee Engine (www.banshee3d.com) **************************************************//
  2. //**************** Copyright (c) 2016 Marko Pintera ([email protected]). All rights reserved. **********************//
  3. #pragma once
  4. #include "BsCorePrerequisites.h"
  5. #include "BsModule.h"
  6. namespace bs { namespace ct
  7. {
  8. /** @addtogroup RenderAPI-Internal
  9. * @{
  10. */
  11. /**
  12. * Handles creation of command buffers. See CommandBuffer.
  13. *
  14. * @note Core thread only.
  15. */
  16. class BS_CORE_EXPORT CommandBufferManager : public Module<CommandBufferManager>
  17. {
  18. public:
  19. virtual ~CommandBufferManager() {}
  20. /** @copydoc CommandBuffer::create */
  21. SPtr<CommandBuffer> create(GpuQueueType type, UINT32 deviceIdx = 0, UINT32 queueIdx = 0,
  22. bool secondary = false);
  23. protected:
  24. friend CommandBuffer;
  25. /** Creates a command buffer with the specified ID. See create(). */
  26. virtual SPtr<CommandBuffer> createInternal(GpuQueueType type, UINT32 deviceIdx = 0,
  27. UINT32 queueIdx = 0, bool secondary = false) = 0;
  28. };
  29. /** @} */
  30. }}