BsVulkanSamplerState.h 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  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 "BsVulkanResource.h"
  6. #include "BsSamplerState.h"
  7. namespace BansheeEngine
  8. {
  9. /** @addtogroup Vulkan
  10. * @{
  11. */
  12. /** Wrapper around a Vulkan sampler object that manages its usage and lifetime. */
  13. class VulkanSampler : public VulkanResource
  14. {
  15. public:
  16. VulkanSampler(VulkanResourceManager* owner, VkSampler sampler);
  17. ~VulkanSampler();
  18. /** Returns the internal handle to the Vulkan object. */
  19. VkSampler getHandle() const { return mSampler; }
  20. private:
  21. VkSampler mSampler;
  22. };
  23. /** Vulkan implementation of a sampler state. Wraps a Vulkan sampler object. */
  24. class VulkanSamplerStateCore : public SamplerStateCore
  25. {
  26. public:
  27. ~VulkanSamplerStateCore();
  28. /** Gets the resource wrapping the sampler object. */
  29. VulkanSampler* getResource() const { return mSampler; }
  30. protected:
  31. friend class D3D11RenderStateCoreManager;
  32. VulkanSamplerStateCore(const SAMPLER_STATE_DESC& desc);
  33. /** @copydoc SamplerStateCore::createInternal */
  34. void createInternal() override;
  35. VulkanSampler* mSampler;
  36. };
  37. /** @} */
  38. }