initial commit
This commit is contained in:
@@ -0,0 +1,42 @@
|
||||
#pragma once
|
||||
|
||||
#include <vulkan/vulkan.h>
|
||||
|
||||
#include <cstdint>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
class RenderPipeline
|
||||
{
|
||||
public:
|
||||
RenderPipeline(
|
||||
VkDevice device,
|
||||
VkFormat swapchainImageFormat);
|
||||
|
||||
~RenderPipeline();
|
||||
|
||||
RenderPipeline(const RenderPipeline&) = delete;
|
||||
RenderPipeline& operator=(const RenderPipeline&) = delete;
|
||||
|
||||
VkRenderPass renderPass() const { return m_renderPass; }
|
||||
VkPipelineLayout pipelineLayout() const { return m_pipelineLayout; }
|
||||
VkDescriptorSetLayout descriptorSetLayout() const { return m_descriptorSetLayout; }
|
||||
VkPipeline graphicsPipeline() const { return m_graphicsPipeline; }
|
||||
|
||||
void release();
|
||||
|
||||
private:
|
||||
std::vector<char> readFile(
|
||||
const std::string& filename);
|
||||
VkShaderModule createShaderModule(
|
||||
const std::vector<char>& code);
|
||||
|
||||
VkDevice m_device;
|
||||
|
||||
VkRenderPass m_renderPass = VK_NULL_HANDLE;
|
||||
VkShaderModule m_vertShaderModule = VK_NULL_HANDLE;
|
||||
VkShaderModule m_fragShaderModule = VK_NULL_HANDLE;
|
||||
VkDescriptorSetLayout m_descriptorSetLayout = VK_NULL_HANDLE;
|
||||
VkPipelineLayout m_pipelineLayout = VK_NULL_HANDLE;
|
||||
VkPipeline m_graphicsPipeline = VK_NULL_HANDLE;
|
||||
};
|
||||
Reference in New Issue
Block a user