CmMultiRenderTexture.h 1.1 KB

1234567891011121314151617181920212223242526272829303132
  1. #pragma once
  2. #include "CmPrerequisites.h"
  3. #include "CmRenderTarget.h"
  4. namespace CamelotEngine
  5. {
  6. class CM_EXPORT MultiRenderTexture : public RenderTarget
  7. {
  8. public:
  9. virtual ~MultiRenderTexture() {}
  10. void setColorSurface(UINT32 surfaceIdx, TexturePtr texture, UINT32 face = 0, UINT32 numFaces = 1, UINT32 mipLevel = 0);
  11. void setDepthStencilSurface(TexturePtr depthStencil, UINT32 face = 0, UINT32 numFaces = 1, UINT32 mipLevel = 0);
  12. bool requiresTextureFlipping() const { return false; }
  13. protected:
  14. vector<TextureView*>::type mColorSurfaces;
  15. TextureView* mDepthStencilSurface;
  16. MultiRenderTexture();
  17. virtual void initialize() {}
  18. virtual void setColorSurfaceImpl(UINT32 surfaceIdx, TexturePtr texture, UINT32 face = 0, UINT32 numFaces = 1, UINT32 mipLevel = 0) = 0;
  19. virtual void setDepthStencilImpl(TexturePtr depthStencilstencil, UINT32 face = 0, UINT32 numFaces = 1, UINT32 mipLevel = 0) = 0;
  20. private:
  21. void throwIfBuffersDontMatch() const;
  22. virtual void copyContentsToMemory(const PixelData &dst, FrameBuffer buffer = FB_AUTO);
  23. };
  24. }