BsGLGpuParamBlockBuffer.h 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. //__________________________ Banshee Project - A modern game development toolkit _________________________________//
  2. //_____________________________________ www.banshee-project.com __________________________________________________//
  3. //________________________ Copyright (c) 2014 Marko Pintera. All rights reserved. ________________________________//
  4. #pragma once
  5. #include "BsGLPrerequisites.h"
  6. #include "BsGpuParamBlockBuffer.h"
  7. namespace BansheeEngine
  8. {
  9. /**
  10. * @brief OpenGL implementation of a GPU parameter buffer (Uniform buffer).
  11. */
  12. class BS_RSGL_EXPORT GLGpuParamBlockBuffer : public GpuParamBlockBuffer
  13. {
  14. public:
  15. GLGpuParamBlockBuffer();
  16. /**
  17. * @copydoc GpuParamBlockBuffer::writeAll.
  18. */
  19. void writeData(const UINT8* data);
  20. /**
  21. * @copydoc GpuParamBlockBuffer::readAll.
  22. */
  23. void readData(UINT8* data) const;
  24. /**
  25. * @brief Returns internal OpenGL uniform buffer handle.
  26. */
  27. GLuint getGLHandle() const { return mGLHandle; }
  28. protected:
  29. /**
  30. * @copydoc CoreGpuObject::initialize_internal.
  31. */
  32. virtual void initialize_internal();
  33. /**
  34. * @copydoc CoreGpuObject::destroy_internal.
  35. */
  36. virtual void destroy_internal();
  37. private:
  38. GLuint mGLHandle;
  39. };
  40. }