BsCommandBuffer.h 1.2 KB

123456789101112131415161718192021222324252627282930313233343536
  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 BansheeEngine
  7. {
  8. /** @addtogroup RenderAPI
  9. * @{
  10. */
  11. /**
  12. * Contains a list of render API commands that can be queued for execution on the GPU. User is allowed to populate the
  13. * command buffer from any thread, ensuring render API command generation can be multi-threaded. Command buffers
  14. * must always be created on the core thread. Same command buffer cannot be used on multiple threads simulateously
  15. * without external synchronization.
  16. */
  17. class BS_CORE_EXPORT CommandBuffer
  18. {
  19. public:
  20. /** @copydoc CommandBufferManager::create */
  21. static SPtr<CommandBuffer> create(CommandBufferType type, UINT32 deviceIdx = 0, UINT32 syncMask = 0xFFFFFFFF,
  22. bool secondary = false);
  23. protected:
  24. CommandBuffer(CommandBufferType type, UINT32 syncMask, bool secondary);
  25. CommandBufferType mType;
  26. UINT32 mSyncMask;
  27. bool mIsSecondary;
  28. };
  29. /** @} */
  30. }