initial commit

This commit is contained in:
Johanness
2026-05-18 00:03:06 +03:00
commit ea7e73d6a4
183 changed files with 34479 additions and 0 deletions
+42
View File
@@ -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;
};