ULRE/example/Vulkan/VKPipeline.h

52 lines
1.1 KiB
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"VK.h"
VK_NAMESPACE_BEGIN
class Pipeline
{
VkDevice device;
2019-04-18 16:38:58 +08:00
VkPipeline pipeline;
public:
Pipeline(VkDevice dev,VkPipeline p){device=dev;pipeline=p;}
2019-04-18 16:38:58 +08:00
virtual ~Pipeline();
};//class GraphicsPipeline
class Shader;
class VertexInput;
class PipelineCreater
{
VkDevice device;
uint width,height;
2019-04-18 16:38:58 +08:00
VkGraphicsPipelineCreateInfo pipelineInfo;
VkPipelineVertexInputStateCreateInfo vis_create_info;
VkPipelineInputAssemblyStateCreateInfo inputAssembly;
VkViewport viewport;
VkRect2D scissor;
VkPipelineViewportStateCreateInfo viewportState;
2019-04-18 16:38:58 +08:00
private:
const Shader * shader =nullptr;
const VertexInput * vertex_input=nullptr;
public:
PipelineCreater(VkDevice dev,uint w,uint h);
2019-04-18 16:38:58 +08:00
~PipelineCreater();
bool Set(const Shader *);
bool Set(const VertexInput *);
bool Set(const VkPrimitiveTopology,bool=false);
2019-04-18 16:38:58 +08:00
Pipeline *Create();
};//class PipelineCreater
VK_NAMESPACE_END
#endif//HGL_GRAPH_VULKAN_PIPELINE_INCLUDE