Toast Engine
Toggle main menu visibility
Loading...
Searching...
No Matches
depth_prepass.hpp
Go to the documentation of this file.
1
6
7
#pragma once
8
9
#include "../shader_layout.hpp"
10
#include "../vulkan_common.hpp"
11
#include "../vulkan_pipeline.hpp"
12
13
#include <cstdint>
14
#include <string_view>
15
#include <vector>
16
17
namespace
renderer {
18
class
VulkanCore
;
19
21
class
DepthPrepass {
22
public
:
23
DepthPrepass(
const
VulkanCore
& core, vk::Format depth_format, vk::Extent2D extent);
24
25
[[nodiscard]]
26
auto
isReady()
const
->
bool
{
27
return
m_pipeline.isReady();
28
}
29
31
void
record
(vk::CommandBuffer cmd, uint32_t frame_index);
32
33
[[nodiscard]]
34
auto
getDrawnCount()
const
noexcept
-> uint32_t {
35
return
m_drawn;
36
}
37
38
private
:
39
void
createResources(
const
VulkanCore
& core);
40
41
const
VulkanCore
* m_core =
nullptr
;
42
43
ShaderLayout
m_shader_layout;
44
VulkanPipeline
m_pipeline;
45
46
std::vector<vk::raii::DescriptorSet> m_descriptor_sets;
47
48
uint32_t m_drawn = 0;
49
};
50
51
}
renderer::DepthPrepass::record
void record(vk::CommandBuffer cmd, uint32_t frame_index)
Expects an open rendering scope with a depth attachment and no colour attachments.
Definition
depth_prepass.cpp:95
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
depth_prepass.hpp
Generated by
1.17.0