You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

40 lines
883 B

#pragma once
#include <glm/mat4x4.hpp>
#include <vulkan/vulkan.h>
class Instance;
class Buffer;
struct UniformBufferObject {
alignas(16) glm::mat4 model;
glm::mat4 view;
glm::mat4 projection;
};
class Pipeline {
public:
2 weeks ago
explicit Pipeline();
explicit Pipeline(VkRenderPass renderPass);
~Pipeline();
VkPipeline handle = VK_NULL_HANDLE;
VkPipelineLayout layout = VK_NULL_HANDLE;
VkDescriptorSet descriptorSet = VK_NULL_HANDLE;
2 weeks ago
void createDescriptorSet(Buffer* buffer, VkDescriptorType type);
protected:
VkShaderModule createShaderModule(const std::vector<char> &code);
VkDescriptorPool descriptorPool = VK_NULL_HANDLE;
VkDescriptorSetLayout descriptorSetLayout = VK_NULL_HANDLE;
void createDescriptorSetLayout();
2 weeks ago
void createDescriptorPool(VkDescriptorType type);
};
2 weeks ago
class ComputePipeline : public Pipeline {
public:
explicit ComputePipeline(Buffer* buffer);
};