2
0

CmMultiRenderTexture.h 967 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  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. bool requiresTextureFlipping() const { return false; }
  21. protected:
  22. Vector<TextureViewPtr>::type mColorSurfaces;
  23. TextureViewPtr mDepthStencilSurface;
  24. MultiRenderTexture();
  25. /**
  26. * @copydoc RenderTarget::destroy_internal()
  27. */
  28. virtual void destroy_internal();
  29. private:
  30. void throwIfBuffersDontMatch() const;
  31. virtual void copyContentsToMemory(const PixelData &dst, FrameBuffer buffer = FB_AUTO);
  32. };
  33. }