CmMultiRenderTexture.h 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. #pragma once
  2. #include "CmPrerequisites.h"
  3. #include "CmRenderTarget.h"
  4. namespace CamelotFramework
  5. {
  6. struct CM_EXPORT MULTI_RENDER_TEXTURE_DESC
  7. {
  8. Vector<RENDER_SURFACE_DESC>::type colorSurfaces;
  9. RENDER_SURFACE_DESC depthStencilSurface;
  10. };
  11. class CM_EXPORT MultiRenderTexture : public RenderTarget
  12. {
  13. public:
  14. virtual ~MultiRenderTexture();
  15. void initialize(const MULTI_RENDER_TEXTURE_DESC& desc);
  16. /**
  17. * @copydoc RenderTarget::isWindow.
  18. */
  19. bool isWindow() const { return true; }
  20. /**
  21. * @copydoc RenderTarget::requiresTextureFlipping.
  22. */
  23. bool requiresTextureFlipping() const { return false; }
  24. protected:
  25. Vector<TextureViewPtr>::type mColorSurfaces;
  26. TextureViewPtr mDepthStencilSurface;
  27. MultiRenderTexture();
  28. /**
  29. * @copydoc RenderTarget::destroy_internal()
  30. */
  31. virtual void destroy_internal();
  32. private:
  33. void throwIfBuffersDontMatch() const;
  34. virtual void copyToMemory(const PixelData &dst, FrameBuffer buffer = FB_AUTO);
  35. };
  36. }