BsVulkanVertexBuffer.h 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. //********************************** Banshee Engine (www.banshee3d.com) **************************************************//
  2. //**************** Copyright (c) 2016 Marko Pintera ([email protected]). All rights reserved. **********************//
  3. #pragma once
  4. #include "BsVulkanPrerequisites.h"
  5. #include "BsVertexBuffer.h"
  6. namespace BansheeEngine
  7. {
  8. /** @addtogroup Vulkan
  9. * @{
  10. */
  11. /** Vulkan implementation of a vertex buffer. */
  12. class VulkanVertexBufferCore : public VertexBufferCore
  13. {
  14. public:
  15. VulkanVertexBufferCore(const VERTEX_BUFFER_DESC& desc, GpuDeviceFlags deviceMask);
  16. ~VulkanVertexBufferCore();
  17. /** @copydoc VertexBufferCore::readData */
  18. void readData(UINT32 offset, UINT32 length, void* dest, UINT32 syncMask = 0x00000001) override;
  19. /** @copydoc VertexBufferCore::writeData */
  20. void writeData(UINT32 offset, UINT32 length, const void* source,
  21. BufferWriteType writeFlags = BWT_NORMAL, UINT32 syncMask = 0x00000001) override;
  22. /** @copydoc VertexBufferCore::copyData */
  23. void copyData(HardwareBuffer& srcBuffer, UINT32 srcOffset, UINT32 dstOffset, UINT32 length,
  24. bool discardWholeBuffer = false, UINT32 syncMask = 0x00000001) override;
  25. protected:
  26. /** @copydoc VertexBufferCore::map */
  27. void* map(UINT32 offset, UINT32 length, GpuLockOptions options, UINT32 syncMask) override;
  28. /** @copydoc VertexBufferCore::unmap */
  29. void unmap(void) override;
  30. /** @copydoc VertexBufferCore::initialize */
  31. void initialize() override;
  32. };
  33. /** @} */
  34. }