BsGLMultiRenderTexture.h 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  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_CORE_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. private:
  29. GLFrameBufferObject* mFB;
  30. /**
  31. * @copydoc MultiRenderTextureCore::getProperties
  32. */
  33. const RenderTargetProperties& getPropertiesInternal() const { return mProperties; }
  34. MultiRenderTextureProperties mProperties;
  35. };
  36. /**
  37. * @brief OpenGL implementation of a render texture with multiple color surfaces.
  38. *
  39. * @note Sim thread only.
  40. */
  41. class BS_RSGL_EXPORT GLMultiRenderTexture : public MultiRenderTexture
  42. {
  43. public:
  44. virtual ~GLMultiRenderTexture() { }
  45. protected:
  46. friend class GLTextureManager;
  47. GLMultiRenderTexture(const MULTI_RENDER_TEXTURE_DESC& desc);
  48. /**
  49. * @copydoc MultiRenderTexture::getProperties
  50. */
  51. const RenderTargetProperties& getPropertiesInternal() const { return mProperties; }
  52. MultiRenderTextureProperties mProperties;
  53. };
  54. }