BsVulkanRenderTexture.h 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. //********************************** Banshee Engine (www.banshee3d.com) **************************************************//
  2. //**************** Copyright (c) 2016 Marko Pintera ([email protected]). All rights reserved. **********************//
  3. #pragma once
  4. #include "BsVulkanPrerequisites.h"
  5. #include "Image/BsTexture.h"
  6. #include "RenderAPI/BsRenderTexture.h"
  7. namespace bs
  8. {
  9. /** @addtogroup Vulkan
  10. * @{
  11. */
  12. /**
  13. * Vulkan implementation of a render texture.
  14. *
  15. * @note Sim thread only.
  16. */
  17. class VulkanRenderTexture : public RenderTexture
  18. {
  19. public:
  20. virtual ~VulkanRenderTexture() { }
  21. protected:
  22. friend class VulkanTextureManager;
  23. VulkanRenderTexture(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. * Vulkan implementation of a render texture.
  32. *
  33. * @note Core thread only.
  34. */
  35. class VulkanRenderTexture : public RenderTexture
  36. {
  37. public:
  38. VulkanRenderTexture(const RENDER_TEXTURE_DESC& desc, UINT32 deviceIdx);
  39. virtual ~VulkanRenderTexture();
  40. /** @copydoc RenderTexture::getCustomAttribute */
  41. void getCustomAttribute(const String& name, void* data) const override;
  42. protected:
  43. /** @copydoc CoreObject::initialize() */
  44. void initialize() override;
  45. /** @copydoc RenderTexture::getProperties */
  46. const RenderTargetProperties& getPropertiesInternal() const override { return mProperties; }
  47. RenderTextureProperties mProperties;
  48. UINT32 mDeviceIdx;
  49. VulkanFramebuffer* mFramebuffer;
  50. };
  51. }
  52. /** @} */
  53. }