2
0

BsGLMultiRenderTexture.h 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. //********************************** Banshee Engine (www.banshee3d.com) **************************************************//
  2. //**************** Copyright (c) 2016 Marko Pintera ([email protected]). All rights reserved. **********************//
  3. #pragma once
  4. #include "BsGLPrerequisites.h"
  5. #include "BsMultiRenderTexture.h"
  6. #include "BsGLFrameBufferObject.h"
  7. namespace BansheeEngine
  8. {
  9. /** @addtogroup GL
  10. * @{
  11. */
  12. class GLMultiRenderTexture;
  13. /**
  14. * OpenGL implementation of a render texture with multiple color surfaces.
  15. *
  16. * @note Core thread only.
  17. */
  18. class BS_RSGL_EXPORT GLMultiRenderTextureCore : public MultiRenderTextureCore
  19. {
  20. public:
  21. GLMultiRenderTextureCore(const MULTI_RENDER_TEXTURE_CORE_DESC& desc);
  22. virtual ~GLMultiRenderTextureCore();
  23. /** @copydoc MultiRenderTextureCore::getCustomAttribute */
  24. void getCustomAttribute(const String& name, void* pData) const override;
  25. protected:
  26. friend class GLTextureManager;
  27. /** @copydoc CoreObjectCore::initialize */
  28. virtual void initialize() override;
  29. private:
  30. GLFrameBufferObject* mFB;
  31. /** @copydoc MultiRenderTextureCore::getProperties */
  32. const RenderTargetProperties& getPropertiesInternal() const override { return mProperties; }
  33. MultiRenderTextureProperties mProperties;
  34. };
  35. /**
  36. * OpenGL implementation of a render texture with multiple color surfaces.
  37. *
  38. * @note Sim thread only.
  39. */
  40. class BS_RSGL_EXPORT GLMultiRenderTexture : public MultiRenderTexture
  41. {
  42. public:
  43. virtual ~GLMultiRenderTexture() { }
  44. protected:
  45. friend class GLTextureManager;
  46. GLMultiRenderTexture(const MULTI_RENDER_TEXTURE_DESC& desc);
  47. /** @copydoc MultiRenderTexture::getProperties */
  48. const RenderTargetProperties& getPropertiesInternal() const override { return mProperties; }
  49. MultiRenderTextureProperties mProperties;
  50. };
  51. /** @} */
  52. }