BsGLMultiRenderTexture.h 1.6 KB

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