HatchitGraphics
ht_vkrootlayout.h
1 
15 #pragma once
16 
17 #include <ht_platform.h>
18 #include <ht_vulkan.h>
19 #include <ht_rootlayout_base.h>
20 #include <ht_rootlayout_resource.h>
21 
22 namespace Hatchit
23 {
24  namespace Graphics
25  {
26  namespace Vulkan
27  {
28  class VKSampler;
29 
30  class HT_API VKRootLayout : public RootLayoutBase
31  {
32  public:
33  VKRootLayout();
34 
35  ~VKRootLayout();
36 
37  bool Initialize(const Resource::RootLayoutHandle& handle, const VkDevice& device, const VkDescriptorPool& descriptorPool);
38 
39  const VkPipelineLayout& VKGetPipelineLayout() const;
40  const VkDescriptorSet& VKGetSamplerSet() const;
41  std::vector<VkDescriptorSetLayout> VKGetDescriptorSetLayouts() const;
42  std::vector<VkPushConstantRange> VKGetPushConstantRanges() const;
43 
44  private:
45  VkDevice m_device;
46 
47  std::vector<VKSampler*> m_samplers; //So we can delete them later
48  VkDescriptorSet m_samplerSet; //Bind this so we can avoid the pipeline complaining about it
49  VkPipelineLayout m_pipelineLayout;
50  std::vector<VkDescriptorSetLayout> m_descriptorSetLayouts;
51  std::vector<VkPushConstantRange> m_pushConstantRanges;
52 
53  bool setupSamplerSet(const VkDevice& device, const VkDescriptorPool& descriptorPool);
54  };
55  }
56  }
57 }
Definition: ht_vkrootlayout.h:30
Hatchit Engine Copyright(c) 2015-2016 Third-Degree.
Definition: ht_color.h:19
Definition: ht_rootlayout_base.h:23