CmD3D11GpuParamBlockBuffer.h 814 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. #pragma once
  2. #include "CmD3D11Prerequisites.h"
  3. #include "CmGpuParamBlockBuffer.h"
  4. namespace CamelotFramework
  5. {
  6. class CM_D3D11_EXPORT D3D11GpuParamBlockBuffer : public GpuParamBlockBuffer
  7. {
  8. public:
  9. D3D11GpuParamBlockBuffer();
  10. /**
  11. * @brief Writes all of the data to the buffer.
  12. * Data size must be the same size as the buffer;
  13. */
  14. void writeData(const UINT8* data);
  15. /**
  16. * @copydoc GpuParamBlockBuffer::readAll.
  17. */
  18. void readData(UINT8* data) const;
  19. ID3D11Buffer* getD3D11Buffer() const;
  20. protected:
  21. /**
  22. * @copydoc CoreGpuObject::initialize_internal.
  23. */
  24. virtual void initialize_internal();
  25. /**
  26. * @copydoc CoreGpuObject::destroy_internal.
  27. */
  28. virtual void destroy_internal();
  29. private:
  30. D3D11HardwareBuffer* mBuffer;
  31. };
  32. }