ULRE/inc/hgl/graph/vulkan/VKPipeline.h

33 lines
888 B
C
Raw Normal View History

2019-04-18 16:38:58 +08:00
#ifndef HGL_GRAPH_VULKAN_PIPELINE_INCLUDE
#define HGL_GRAPH_VULKAN_PIPELINE_INCLUDE
#include<hgl/graph/vulkan/VK.h>
#include<hgl/graph/vulkan/VKPipelineData.h>
#include<hgl/io/DataOutputStream.h>
2019-04-18 16:38:58 +08:00
VK_NAMESPACE_BEGIN
class Pipeline
{
VkDevice device;
2019-04-18 16:38:58 +08:00
VkPipeline pipeline;
2020-09-19 14:58:54 +08:00
PipelineData *data;
2019-04-18 16:38:58 +08:00
bool alpha_test;
bool alpha_blend;
2019-04-18 16:38:58 +08:00
public:
2020-09-19 14:58:54 +08:00
Pipeline(VkDevice dev,VkPipeline p,PipelineData *pd):device(dev),pipeline(p),data(pd){}
2019-04-18 16:38:58 +08:00
virtual ~Pipeline();
2019-04-18 21:02:42 +08:00
operator VkPipeline(){return pipeline;}
2020-09-19 14:58:54 +08:00
const PipelineData *GetData()const{return data;}
const bool IsAlphaTest()const{return data->alpha_test>0;}
const bool IsAlphaBlend()const{return data->alpha_blend;}
2019-04-18 16:38:58 +08:00
};//class GraphicsPipeline
2020-09-19 14:58:54 +08:00
Pipeline *CreatePipeline(Device *dev,PipelineData *,const Material *material,const RenderTarget *);
2019-04-18 16:38:58 +08:00
VK_NAMESPACE_END
#endif//HGL_GRAPH_VULKAN_PIPELINE_INCLUDE