2
0

BsGLMultiRenderTexture.h 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  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. class GLMultiRenderTexture;
  10. /**
  11. * @brief OpenGL implementation of a render texture with multiple color surfaces.
  12. *
  13. * @note Core thread only.
  14. */
  15. class BS_RSGL_EXPORT GLMultiRenderTextureCore : public MultiRenderTextureCore
  16. {
  17. public:
  18. GLMultiRenderTextureCore(const MULTI_RENDER_TEXTURE_CORE_DESC& desc);
  19. virtual ~GLMultiRenderTextureCore();
  20. /**
  21. * @copydoc MultiRenderTextureCore::getCustomAttribute
  22. */
  23. void getCustomAttribute(const String& name, void* pData) const override;
  24. protected:
  25. friend class GLTextureManager;
  26. /**
  27. * @copydoc CoreObjectCore::initialize
  28. */
  29. virtual void initialize() override;
  30. private:
  31. GLFrameBufferObject* mFB;
  32. /**
  33. * @copydoc MultiRenderTextureCore::getProperties
  34. */
  35. const RenderTargetProperties& getPropertiesInternal() const override { return mProperties; }
  36. MultiRenderTextureProperties mProperties;
  37. };
  38. /**
  39. * @brief OpenGL implementation of a render texture with multiple color surfaces.
  40. *
  41. * @note Sim thread only.
  42. */
  43. class BS_RSGL_EXPORT GLMultiRenderTexture : public MultiRenderTexture
  44. {
  45. public:
  46. virtual ~GLMultiRenderTexture() { }
  47. protected:
  48. friend class GLTextureManager;
  49. GLMultiRenderTexture(const MULTI_RENDER_TEXTURE_DESC& desc);
  50. /**
  51. * @copydoc MultiRenderTexture::getProperties
  52. */
  53. const RenderTargetProperties& getPropertiesInternal() const override { return mProperties; }
  54. MultiRenderTextureProperties mProperties;
  55. };
  56. }