stories/engine/program/pipeline.h

35 lines
601 B
C
Raw Normal View History

#pragma once
#include <stdint.h>
#include <vector>
#include <string>
#include <vulkan/vulkan.h>
#include "program.h"
namespace Engine {
class LogicalDevice;
class Pipeline {
public:
Pipeline(const Program& program, LogicalDevice* device);
Pipeline(const Pipeline& other);
~Pipeline();
void bind(const VkCommandBuffer& buffer) const;
private:
void createLayout();
void createPipeline();
VkShaderModule createShaderModule(Program::ShaderType type);
private:
LogicalDevice* device;
const Program& program;
VkPipeline vk;
VkPipelineLayout layout;
};
}