Starting to unhardcode, pipelines are now created from outside

This commit is contained in:
Blue 2023-10-16 15:47:47 -03:00
parent 2b33897b4a
commit dc3ac2fdf5
Signed by: blue
GPG key ID: 9B203B252A63EE38
16 changed files with 386 additions and 159 deletions

34
engine/program/pipeline.h Normal file
View 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;
};
}