ULRE/example/Vulkan/VKPipelineLayout.h

33 lines
933 B
C
Raw Normal View History

#ifndef HGL_GRAPH_VULKAN_PIPELINE_LAYOUT_INCLUDE
#define HGL_GRAPH_VULKAN_PIPELINE_LAYOUT_INCLUDE
#include"VK.h"
#include"VKDescriptorSets.h"
VK_NAMESPACE_BEGIN
class PipelineLayout
{
VkDevice device;
VkPipelineLayout layout;
const DescriptorSets *desc_sets;
2019-04-18 21:02:42 +08:00
private:
friend PipelineLayout *CreatePipelineLayout(VkDevice dev,const DescriptorSetLayout *dsl);
PipelineLayout(VkDevice dev,VkPipelineLayout pl,const DescriptorSets *ds){device=dev;layout=pl;desc_sets=ds;}
2019-04-18 21:02:42 +08:00
public:
~PipelineLayout();
2019-04-18 21:02:42 +08:00
operator VkPipelineLayout (){return layout;}
const uint32_t GetDescriptorSetCount ()const{return desc_sets->GetCount();}
const VkDescriptorSet * GetDescriptorSets ()const{return desc_sets->GetData();}
};//class PipelineLayout
2019-04-18 21:02:42 +08:00
PipelineLayout *CreatePipelineLayout(VkDevice dev,const DescriptorSetLayout *dsl);
VK_NAMESPACE_END
#endif//HGL_GRAPH_VULKAN_PIPELINE_LAYOUT_INCLUDE