10 #include <ThirdParty/Vulkan/Include/vulkan/vulkan.h> 11 #include <ThirdParty/EASTL-master/include/EASTL/vector.h> 15 class ResourceManager;
18 class ENGINE_API VulkanTexture :
public Texture
20 friend class ResourceManager;
21 friend class VulkanRenderer;
23 static void InitTextureSystem(VulkanRenderer* renderer, VulkanLogicalDevice* device, VulkanDescriptorPool* descriptorPool, VmaAllocator allocator, VkCommandPool commandPool);
26 ~VulkanTexture()
override;
29 void SetSampler(VkSamplerCreateInfo samplerInfo);
31 VulkanTexture(
int width,
int height);
33 VkImage GetImage()
const;
34 VkImageView GetImageView()
const;
35 VkSampler GetSampler()
const;
37 VkDescriptorSet CreateDescriptorSet(
size_t threadID,
size_t pipelineID,
size_t set,
38 VkDescriptorSetLayout layout);
40 VkDescriptorSet GetDescriptorSet(
size_t threadID,
size_t pipelineID,
size_t set);
43 friend class VulkanRenderer;
45 VulkanTexture(
const eastl::string& filename,
int desiredChannels = 4);
48 VmaAllocation allocation;
49 VmaAllocationInfo allocationInfo;
51 VkImageView imageView;
57 eastl::vector<eastl::vector<eastl::vector<VkDescriptorSet>>> descriptorSets;
59 static VulkanRenderer* renderer;
60 static VulkanLogicalDevice* device;
61 static VulkanDescriptorPool* descriptorPool;
62 static VmaAllocator allocator;
63 static VkCommandPool commandPool;