BsGLMultiRenderTexture.h 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  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(GLMultiRenderTexture* parent, MultiRenderTextureProperties* properties, 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. private:
  25. GLFrameBufferObject* mFB;
  26. };
  27. /**
  28. * @brief OpenGL implementation of a render texture with multiple color surfaces.
  29. *
  30. * @note Sim thread only.
  31. */
  32. class BS_RSGL_EXPORT GLMultiRenderTexture : public MultiRenderTexture
  33. {
  34. public:
  35. virtual ~GLMultiRenderTexture() { }
  36. /**
  37. * @copydoc MultiRenderTexture::requiresTextureFlipping
  38. */
  39. bool requiresTextureFlipping() const { return true; }
  40. protected:
  41. friend class GLTextureManager;
  42. GLMultiRenderTexture() { }
  43. /**
  44. * @copydoc MultiRenderTexture::createProperties
  45. */
  46. virtual RenderTargetProperties* createProperties() const;
  47. /**
  48. * @copydoc MultiRenderTexture::createCore
  49. */
  50. virtual MultiRenderTextureCore* createCore(MultiRenderTextureProperties* properties, const MULTI_RENDER_TEXTURE_DESC& desc);
  51. };
  52. }