CmMultiRenderTexture.cpp 879 B

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 surfaceIndex, TexturePtr texture, UINT32 face = 0, UINT32 numFaces = 0, UINT32 mipLevel = 0);
  11. void setDepthStencil(DepthStencilBufferPtr depthStencilbuffer);
  12. TexturePtr getTexture(UINT32 index) const { return mTextures.at(index); }
  13. DepthStencilBufferPtr getDepthStencilBuffer() const { return mDepthStencilBuffer; }
  14. bool requiresTextureFlipping() const { return false; }
  15. protected:
  16. vector<TexturePtr>::type mTextures;
  17. DepthStencilBufferPtr mDepthStencilBuffer;
  18. MultiRenderTexture();
  19. void initialize();
  20. void createInternalResources();
  21. virtual void createInternalResourcesImpl() = 0;
  22. };
  23. }