Toast Engine
Loading...
Searching...
No Matches
grid_pass.hpp
Go to the documentation of this file.
1
6
7#pragma once
8#include "../render_pass_base.hpp"
9#include "../shader_layout.hpp"
10#include "../vulkan_pipeline.hpp"
11
12#include <glm/glm.hpp>
13#include <vector>
14
15namespace renderer {
16class VulkanCore;
17
18class GridPass : public IRenderPass {
19public:
20 GridPass(const renderer::VulkanCore& core, vk::Format color_format, vk::Format depth_format, vk::Extent2D extent);
21
22 [[nodiscard]]
23 auto stage() const -> RenderStage override {
24 return RenderStage::overlay;
25 }
26
27 void record(vk::CommandBuffer cmd, uint32_t frame_index, uint32_t image_index) override;
28
29 [[nodiscard]]
30 auto name() const -> std::string_view override {
31 return "Grid";
32 }
33
34private:
35 struct DrawPushConstants {
36 glm::mat4 model;
37 };
38
39 void createResources(const renderer::VulkanCore& core);
40
41 VulkanPipeline m_pipeline;
42 ShaderLayout m_shader_layout;
43 std::vector<vk::raii::DescriptorSet> m_frame_descriptor_sets;
44 vma::raii::Buffer m_vertex_buffer = nullptr;
45};
46
47}
Definition render_pass_base.hpp:19
Definition shader_layout.hpp:12
Definition vulkan_core.hpp:48
Definition vulkan_pipeline.hpp:19