BsVulkanRenderTexture.h 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  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 "BsTexture.h"
  6. #include "BsRenderTexture.h"
  7. namespace bs
  8. {
  9. /** @addtogroup Vulkan
  10. * @{
  11. */
  12. class VulkanRenderTexture;
  13. /**
  14. * Vulkan implementation of a render texture.
  15. *
  16. * @note Core thread only.
  17. */
  18. class VulkanRenderTextureCore : public RenderTextureCore
  19. {
  20. public:
  21. VulkanRenderTextureCore(const RENDER_TEXTURE_DESC_CORE& desc, UINT32 deviceIdx);
  22. virtual ~VulkanRenderTextureCore();
  23. /** @copydoc RenderTextureCore::getCustomAttribute */
  24. void getCustomAttribute(const String& name, void* data) const override;
  25. protected:
  26. /** @copydoc CoreObjectCore::initialize() */
  27. void initialize() override;
  28. /** @copydoc RenderTextureCore::getProperties */
  29. const RenderTargetProperties& getPropertiesInternal() const override { return mProperties; }
  30. RenderTextureProperties mProperties;
  31. UINT32 mDeviceIdx;
  32. VulkanFramebuffer* mFramebuffer;
  33. };
  34. /**
  35. * Vulkan implementation of a render texture.
  36. *
  37. * @note Sim thread only.
  38. */
  39. class VulkanRenderTexture : public RenderTexture
  40. {
  41. public:
  42. virtual ~VulkanRenderTexture() { }
  43. protected:
  44. friend class VulkanTextureManager;
  45. VulkanRenderTexture(const RENDER_TEXTURE_DESC& desc);
  46. /** @copydoc RenderTexture::getProperties */
  47. const RenderTargetProperties& getPropertiesInternal() const override { return mProperties; }
  48. RenderTextureProperties mProperties;
  49. };
  50. /** @} */
  51. }