A subpass represents one part of a RenderPipeline.
More...
#include <Subpass.h>
Inherits Fling::NonCopyable.
Inherited by Fling::DebugSubpass, Fling::GeometrySubpass, Fling::ImGuiSubpass, and Fling::OffscreenSubpass.
|
| | Subpass (const LogicalDevice *t_Dev, const Swapchain *t_Swap, std::shared_ptr< Fling::Shader > t_Vert, std::shared_ptr< Fling::Shader > t_Frag) |
| |
| virtual | ~Subpass () |
| |
| virtual void | PrepareAttachments () |
| | Add any attachments to a frame buffer that this subpass may need. More...
|
| |
| virtual void | CreateGraphicsPipeline ()=0 |
| |
| virtual void | Draw (CommandBuffer &t_CmdBuf, VkFramebuffer t_PresentFrameBuf, UINT32 t_ActiveFrameInFlight, entt::registry &t_reg, float DeltaTime)=0 |
| |
| virtual void | CleanUp (entt::registry &t_reg) |
| | Cleanup any allocated resources that you may need a registry for. More...
|
| |
| virtual void | CreateDescriptorSets (VkDescriptorPool t_Pool, entt::registry &t_reg)=0 |
| | Given the frame buffers and the registry, create any descriptor sets that we may need Assumes that the frame buffer has been prepared with it's attachments already. More...
|
| |
| virtual void | GatherPresentDependencies (std::vector< CommandBuffer *> &t_CmdBuffs, std::vector< VkSemaphore > &t_Deps, UINT32 t_ActiveFrameIndex, UINT32 t_CurrentFrameInFlight) |
| | If a subpass has a command buffer that the final swap chain presentation is dependent on, then add it this vector. More...
|
| |
| virtual void | GatherPresentBuffers (std::vector< CommandBuffer *> &t_CmdBuffs, UINT32 t_ActiveFrameIndex) |
| | If a subpass has an additional command buffer to add to the final swap chain draw submission but it is not dependent on it, then add it here. More...
|
| |
| GraphicsPipeline * | GetGraphicsPipeline () const noexcept |
| |
| const std::vector< VkClearValue > & | GetClearValues () const |
| |
| | NonCopyable (const NonCopyable &)=delete |
| |
| | NonCopyable (NonCopyable &&)=default |
| |
| NonCopyable & | operator= (const NonCopyable &)=delete |
| |
| NonCopyable & | operator= (NonCopyable &&)=default |
| |
A subpass represents one part of a RenderPipeline.
Each subpass should can add attachments to the frame buffer, build it's own command buffers, and create its own descriptors. When overriding this class, add any additional uniform buffers or bindings you may need into the child class.
- See also
- GeometrySubpass for an example
◆ Subpass()
◆ ~Subpass()
| Fling::Subpass::~Subpass |
( |
| ) |
|
|
virtual |
◆ CleanUp()
| virtual void Fling::Subpass::CleanUp |
( |
entt::registry & |
t_reg | ) |
|
|
inlinevirtual |
◆ CreateDescriptorSets()
| virtual void Fling::Subpass::CreateDescriptorSets |
( |
VkDescriptorPool |
t_Pool, |
|
|
entt::registry & |
t_reg |
|
) |
| |
|
pure virtual |
◆ CreateGraphicsPipeline()
| virtual void Fling::Subpass::CreateGraphicsPipeline |
( |
| ) |
|
|
pure virtual |
◆ Draw()
| virtual void Fling::Subpass::Draw |
( |
CommandBuffer & |
t_CmdBuf, |
|
|
VkFramebuffer |
t_PresentFrameBuf, |
|
|
UINT32 |
t_ActiveFrameInFlight, |
|
|
entt::registry & |
t_reg, |
|
|
float |
DeltaTime |
|
) |
| |
|
pure virtual |
◆ GatherPresentBuffers()
| virtual void Fling::Subpass::GatherPresentBuffers |
( |
std::vector< CommandBuffer *> & |
t_CmdBuffs, |
|
|
UINT32 |
t_ActiveFrameIndex |
|
) |
| |
|
inlinevirtual |
If a subpass has an additional command buffer to add to the final swap chain draw submission but it is not dependent on it, then add it here.
ImGUI is an example of this
◆ GatherPresentDependencies()
| virtual void Fling::Subpass::GatherPresentDependencies |
( |
std::vector< CommandBuffer *> & |
t_CmdBuffs, |
|
|
std::vector< VkSemaphore > & |
t_Deps, |
|
|
UINT32 |
t_ActiveFrameIndex, |
|
|
UINT32 |
t_CurrentFrameInFlight |
|
) |
| |
|
inlinevirtual |
If a subpass has a command buffer that the final swap chain presentation is dependent on, then add it this vector.
The Deferred offscreen GBuffer is an example of this
Reimplemented in Fling::OffscreenSubpass.
◆ GetClearValues()
| const std::vector<VkClearValue>& Fling::Subpass::GetClearValues |
( |
| ) |
const |
|
inline |
◆ GetGraphicsPipeline()
◆ PrepareAttachments()
| virtual void Fling::Subpass::PrepareAttachments |
( |
| ) |
|
|
inlinevirtual |
◆ m_ClearValues
| std::vector<VkClearValue> Fling::Subpass::m_ClearValues = std::vector<VkClearValue>(2) |
|
protected |
The clear values that will be used when building the command buffer to run this subpass.
◆ m_Device
◆ m_FragShader
◆ m_GraphicsPipeline
Layouts created in the constructor via shader reflection.
◆ m_SwapChain
◆ m_VertexShader
The documentation for this class was generated from the following files: