CmD3D11TextureView.h 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. #pragma once
  2. #include "CmD3D11Prerequisites.h"
  3. #include "CmTextureView.h"
  4. namespace CamelotFramework
  5. {
  6. class CM_D3D11_EXPORT D3D11TextureView : public TextureView
  7. {
  8. public:
  9. ID3D11ShaderResourceView* getSRV() const { return mSRV; }
  10. ID3D11RenderTargetView* getRTV() const { return mRTV; }
  11. ID3D11UnorderedAccessView* getUAV() const { return mUAV; }
  12. ID3D11DepthStencilView* getDSV() const { return mDSV; }
  13. protected:
  14. friend class D3D11Texture;
  15. D3D11TextureView();
  16. void initialize_internal();
  17. void destroy_internal();
  18. private:
  19. ID3D11ShaderResourceView* mSRV;
  20. ID3D11RenderTargetView* mRTV;
  21. ID3D11UnorderedAccessView* mUAV;
  22. ID3D11DepthStencilView* mDSV;
  23. ID3D11ShaderResourceView* createSRV(D3D11Texture* texture,
  24. UINT32 mostDetailMip, UINT32 numMips, UINT32 firstArraySlice, UINT32 numArraySlices);
  25. ID3D11RenderTargetView* createRTV(D3D11Texture* texture,
  26. UINT32 mostDetailMip, UINT32 numMips, UINT32 firstArraySlice, UINT32 numArraySlices);
  27. ID3D11UnorderedAccessView* createUAV(D3D11Texture* texture,
  28. UINT32 mostDetailMip, UINT32 numMips, UINT32 firstArraySlice, UINT32 numArraySlices);
  29. ID3D11DepthStencilView* createDSV(D3D11Texture* texture,
  30. UINT32 mostDetailMip, UINT32 numMips, UINT32 firstArraySlice, UINT32 numArraySlices);
  31. };
  32. }