Starting to unhardcode, pipelines are now created from outside
This commit is contained in:
parent
2b33897b4a
commit
dc3ac2fdf5
16 changed files with 386 additions and 159 deletions
34
engine/program/pipeline.h
Normal file
34
engine/program/pipeline.h
Normal file
|
@ -0,0 +1,34 @@
|
|||
#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;
|
||||
};
|
||||
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue