CmD3D11MultiRenderTexture.cpp 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. #include "CmD3D11MultiRenderTexture.h"
  2. #include "CmD3D11Texture.h"
  3. #include "CmD3D11RenderTexture.h"
  4. #include "CmD3D11TextureView.h"
  5. namespace CamelotEngine
  6. {
  7. D3D11MultiRenderTexture::D3D11MultiRenderTexture()
  8. :MultiRenderTexture()
  9. {
  10. }
  11. D3D11MultiRenderTexture::~D3D11MultiRenderTexture()
  12. {
  13. }
  14. void D3D11MultiRenderTexture::setColorSurfaceImpl(UINT32 surfaceIdx, TexturePtr texture, UINT32 face, UINT32 numFaces, UINT32 mipLevel)
  15. { }
  16. void D3D11MultiRenderTexture::setDepthStencilImpl(TexturePtr depthStencilSurface, UINT32 face, UINT32 numFaces, UINT32 mipLevel)
  17. { }
  18. void D3D11MultiRenderTexture::getCustomAttribute(const String& name, void* pData)
  19. {
  20. if(name == "RTV")
  21. {
  22. ID3D11RenderTargetView** pRTVs = (ID3D11RenderTargetView **)pData;
  23. for(size_t x = 0; x < mColorSurfaces.size(); ++x)
  24. {
  25. D3D11TextureView* textureView = static_cast<D3D11TextureView*>(mColorSurfaces[x]);
  26. pRTVs[x] = textureView->getRTV();
  27. }
  28. return;
  29. }
  30. else if(name == "DSV")
  31. {
  32. ID3D11DepthStencilView** pDSV = (ID3D11DepthStencilView **)pData;
  33. D3D11TextureView* depthStencilView = static_cast<D3D11TextureView*>(mDepthStencilSurface);
  34. *pDSV = depthStencilView->getDSV();
  35. return;
  36. }
  37. }
  38. }