BsD3D11GpuParamBlockBuffer.h 1.0 KB

1234567891011121314151617181920212223242526272829303132333435
  1. //********************************** Banshee Engine (www.banshee3d.com) **************************************************//
  2. //**************** Copyright (c) 2016 Marko Pintera ([email protected]). All rights reserved. **********************//
  3. #pragma once
  4. #include "BsD3D11Prerequisites.h"
  5. #include "RenderAPI/BsGpuParamBlockBuffer.h"
  6. namespace bs { namespace ct
  7. {
  8. /** @addtogroup D3D11
  9. * @{
  10. */
  11. /** DirectX 11 implementation of a parameter block buffer (constant buffer in DX11 lingo). */
  12. class D3D11GpuParamBlockBuffer : public GpuParamBlockBuffer
  13. {
  14. public:
  15. D3D11GpuParamBlockBuffer(UINT32 size, GpuParamBlockUsage usage, GpuDeviceFlags deviceMask);
  16. ~D3D11GpuParamBlockBuffer();
  17. /** @copydoc GpuParamBlockBuffer::writeToGPU */
  18. void writeToGPU(const UINT8* data, UINT32 queueIdx = 0) override;
  19. /** Returns internal DX11 buffer object. */
  20. ID3D11Buffer* getD3D11Buffer() const;
  21. protected:
  22. /** @copydoc GpuParamBlockBuffer::initialize */
  23. void initialize() override;
  24. private:
  25. D3D11HardwareBuffer* mBuffer;
  26. };
  27. /** @} */
  28. }}