SPARK  0.1.0
A general purpose game engine written in C++.
Loading...
Searching...
No Matches
VulkanRenderPipeline.h
1#pragma once
2
3#include "spark/base/Macros.h"
4#include "spark/render/RenderPipeilne.h"
5#include "spark/render/vk/Export.h"
6#include "spark/render/vk/VulkanInputAssembler.h"
7#include "spark/render/vk/VulkanPipeline.h"
8#include "spark/render/vk/VulkanRasterizer.h"
9
10namespace spark::render::vk
11{
12 class VulkanShaderProgram;
13 class VulkanPipelineLayout;
14 class VulkanRenderPass;
15 class VulkanDescriptorSet;
16
17 SPARK_WARNING_PUSH
18 SPARK_DISABLE_MSVC_WARNING(4250) // 'VulkanRenderPipeline': inherits 'StateResource::name' via dominance
19
20
25 {
26 public:
37 explicit VulkanRenderPipeline(const VulkanRenderPass& render_pass,
38 std::shared_ptr<VulkanShaderProgram> shader_program,
39 std::shared_ptr<VulkanPipelineLayout> layout,
40 std::shared_ptr<VulkanInputAssembler> input_assembler,
41 std::shared_ptr<VulkanRasterizer> rasterizer,
42 bool enable_alpha_to_coverage = false,
43 const std::string& name = "");
44 ~VulkanRenderPipeline() override;
45
46 VulkanRenderPipeline(const VulkanRenderPipeline& other) = delete;
47 VulkanRenderPipeline(VulkanRenderPipeline&& other) noexcept = delete;
48 VulkanRenderPipeline& operator=(const VulkanRenderPipeline& other) = delete;
49 VulkanRenderPipeline& operator=(VulkanRenderPipeline&& other) noexcept = delete;
50
52 [[nodiscard]] std::shared_ptr<const VulkanShaderProgram> program() const noexcept override;
53
55 [[nodiscard]] std::shared_ptr<VulkanPipelineLayout> layout() const noexcept override;
56
58 [[nodiscard]] bool alphaToCoverage() const noexcept override;
59
61 [[nodiscard]] std::shared_ptr<VulkanInputAssembler> inputAssembler() const noexcept override;
62
64 [[nodiscard]] std::shared_ptr<VulkanRasterizer> rasterizer() const noexcept override;
65
67 void use(const VulkanCommandBuffer& command_buffer) const noexcept override;
68
70 void bind(const VulkanCommandBuffer& command_buffer, const VulkanDescriptorSet& descriptor_set) const noexcept override;
71
72 private:
73 struct Impl;
74 std::unique_ptr<Impl> m_impl;
75 };
76
77 SPARK_WARNING_POP
78}
Represents a graphics IPipeline.
Definition RenderPipeilne.h:57
Vulkan implementation of ICommandBuffer.
Definition VulkanCommandBuffer.h:29
Vulkan implementation of IDescriptorSet.
Definition VulkanDescriptorSet.h:24
Vulkan implementation of IInputAssembler.
Definition VulkanInputAssembler.h:20
Vulkan implementation of IPipelineLayout.
Definition VulkanPipelineLayout.h:22
Vulkan implementation of IPipeline.
Definition VulkanPipeline.h:20
Vulkan implementation of IRasterizer.
Definition VulkanRasterizer.h:12
Vulkan implementation of IRenderPass.
Definition VulkanRenderPass.h:27
Vulkan implementation of IRenderPipeline.
Definition VulkanRenderPipeline.h:25
Vulkan implementation of a ShaderProgram.
Definition VulkanShaderProgram.h:13
Definition VulkanRenderPipeline.cpp:21