NarcEngine 0.1.1
C++ Vulkan game engine
 
Loading...
Searching...
No Matches
GraphicsPipeline.h
1//
2// Created by theoh on 3/16/2025.
3//
4
5#pragma once
6#include <vulkan/vulkan_core.h>
7
8#include "SwapChain.h"
9#include "core/DeviceComponent.h"
10
11namespace narc_engine {
12 class CommandBuffer;
13
14 class GraphicsPipeline : public DeviceComponent
15 {
16 public:
17 VkPipelineInputAssemblyStateCreateInfo createInputAssemblyStateInfo();
18 VkPipelineViewportStateCreateInfo createViewportStateInfo();
19 VkPipelineDepthStencilStateCreateInfo createDepthStencilStateInfo();
20 VkPipelineRasterizationStateCreateInfo createRasterizationStateInfo();
21 VkPipelineMultisampleStateCreateInfo createMultisampleStateInfo();
22 VkPipelineColorBlendAttachmentState createColorBlendAttachmentState();
23 VkPipelineColorBlendStateCreateInfo createColorBlendStateInfo(const VkPipelineColorBlendAttachmentState& colorBlendAttachment);
24 VkPipelineDynamicStateCreateInfo createDynamicStateInfo(const std::vector<VkDynamicState>& dynamicStates);
25 VkPipelineLayoutCreateInfo createLayoutInfo(const VkDescriptorSetLayout* descriptorSetLayout);
26 explicit GraphicsPipeline(const SwapChain* swapChain, const VkDescriptorSetLayout* descriptorSetLayout);
27 ~GraphicsPipeline();
28
29 GETTER VkPipelineLayout getLayout() const { return m_pipelineLayout; }
30
31 void bindPipeline(const CommandBuffer* commandBuffer) const;
32
33 private:
34 VkPipeline m_pipeline;
35 VkPipelineLayout m_pipelineLayout;
36
37 VkPipelineVertexInputStateCreateInfo createPipelineVertexInputInfo(VkVertexInputBindingDescription vertexDescriptions,
38 const std::array<VkVertexInputAttributeDescription, 3>& attributeDescription);
39 };
40}
Definition CommandBuffer.h:6
Definition SwapChain.h:13