BsGLGpuParamBlockBuffer.h 860 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. #pragma once
  2. #include "BsGLPrerequisites.h"
  3. #include "BsGpuParamBlockBuffer.h"
  4. namespace BansheeEngine
  5. {
  6. /**
  7. * @brief OpenGL implementation of a GPU parameter buffer (Uniform buffer).
  8. */
  9. class BS_RSGL_EXPORT GLGpuParamBlockBuffer : public GpuParamBlockBuffer
  10. {
  11. public:
  12. GLGpuParamBlockBuffer();
  13. /**
  14. * @copydoc GpuParamBlockBuffer::writeAll.
  15. */
  16. void writeData(const UINT8* data);
  17. /**
  18. * @copydoc GpuParamBlockBuffer::readAll.
  19. */
  20. void readData(UINT8* data) const;
  21. /**
  22. * @brief Returns internal OpenGL uniform buffer handle.
  23. */
  24. GLuint getGLHandle() const { return mGLHandle; }
  25. protected:
  26. /**
  27. * @copydoc CoreGpuObject::initialize_internal.
  28. */
  29. virtual void initialize_internal();
  30. /**
  31. * @copydoc CoreGpuObject::destroy_internal.
  32. */
  33. virtual void destroy_internal();
  34. private:
  35. GLuint mGLHandle;
  36. };
  37. }