BsD3D11RenderTexture.h 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. //********************************** Banshee Engine (www.banshee3d.com) **************************************************//
  2. //**************** Copyright (c) 2016 Marko Pintera ([email protected]). All rights reserved. **********************//
  3. #pragma once
  4. #include "BsD3D11Prerequisites.h"
  5. #include "Image/BsTexture.h"
  6. #include "RenderAPI/BsRenderTexture.h"
  7. namespace bs
  8. {
  9. /** @addtogroup D3D11
  10. * @{
  11. */
  12. /**
  13. * DirectX 11 implementation of a render texture.
  14. *
  15. * @note Sim thread only.
  16. */
  17. class D3D11RenderTexture : public RenderTexture
  18. {
  19. public:
  20. virtual ~D3D11RenderTexture() { }
  21. protected:
  22. friend class D3D11TextureManager;
  23. D3D11RenderTexture(const RENDER_TEXTURE_DESC& desc);
  24. /** @copydoc RenderTexture::getProperties */
  25. const RenderTargetProperties& getPropertiesInternal() const override { return mProperties; }
  26. RenderTextureProperties mProperties;
  27. };
  28. namespace ct
  29. {
  30. /**
  31. * DirectX 11 implementation of a render texture.
  32. *
  33. * @note Core thread only.
  34. */
  35. class D3D11RenderTexture : public RenderTexture
  36. {
  37. public:
  38. D3D11RenderTexture(const RENDER_TEXTURE_DESC& desc, UINT32 deviceIdx);
  39. virtual ~D3D11RenderTexture() { }
  40. /** @copydoc RenderTexture::getCustomAttribute */
  41. void getCustomAttribute(const String& name, void* data) const override;
  42. protected:
  43. /** @copydoc RenderTexture::getProperties */
  44. const RenderTargetProperties& getPropertiesInternal() const override { return mProperties; }
  45. RenderTextureProperties mProperties;
  46. };
  47. }
  48. /** @} */
  49. }