Toast Engine
Toggle main menu visibility
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
15
namespace
renderer {
16
class
VulkanCore
;
17
18
class
GridPass :
public
IRenderPass
{
19
public
:
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
34
private
:
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
}
IRenderPass
Definition
render_pass_base.hpp:19
renderer::ShaderLayout
Definition
shader_layout.hpp:12
renderer::VulkanCore
Definition
vulkan_core.hpp:48
renderer::VulkanPipeline
Definition
vulkan_pipeline.hpp:19
engine
src
toast
renderer
passes
grid_pass.hpp
Generated by
1.17.0