2#include "../base/foray_framerenderinfo.hpp"
3#include "../core/foray_context.hpp"
4#include "../core/foray_descriptorset.hpp"
5#include "../core/foray_managedimage.hpp"
6#include "../foray_basics.hpp"
7#include "../osi/foray_env.hpp"
8#include "../core/foray_core_declares.hpp"
9#include <unordered_map>
34 virtual void Resize(
const VkExtent2D& extent);
Context used for render processes. This object is rebuilt for every frame. /.
Definition foray_framerenderinfo.hpp:14
Wraps allocation and lifetime functionality of VkImage.
Definition foray_managedimage.hpp:13
Render stage base class giving a common interface for rendering processes.
Definition foray_renderstage.hpp:15
virtual ~RenderStage()
Definition foray_renderstage.hpp:47
std::unordered_map< std::string, core::ManagedImage * > mImageOutputs
Inheriting types should emplace their images onto this collection to provide them in GetImageOutput i...
Definition foray_renderstage.hpp:56
core::Context * mContext
Context object the renderstage is built upon.
Definition foray_renderstage.hpp:60
std::vector< uint64_t > mShaderKeys
Inheriting types should emplace their shader keys onto this collection such that if a shader has been...
Definition foray_renderstage.hpp:58
virtual void DestroyOutputImages()
Calls Destroy() on any image in mImageOutputs and clears mImageOutputs.
std::vector< core::ManagedImage * > GetImageOutputs()
Gets a vector to all color attachments that will be included in a texture array and can be referenced...
virtual void Destroy()
Destroy the render stage. Finalizes all components.
Definition foray_renderstage.hpp:29
virtual void OnShadersRecompiled(const std::unordered_set< uint64_t > &recompiled)
Notifies the stage that the shader compiler instance has recompiled a shader.
core::ManagedImage * GetImageOutput(std::string_view name, bool noThrow=false)
Gets an image output.
virtual void RecordFrame(VkCommandBuffer cmdBuffer, base::FrameRenderInfo &renderInfo)
Records a frame to cmdBuffer.
Definition foray_renderstage.hpp:26
virtual void Resize(const VkExtent2D &extent)
Default implementation accesses mImageOutputs and calls ManagedImage::Resize(extent) on any set image...
virtual void ReloadShaders()
Override this to reload all shaders and rebuild pipelines after a registered shader has been recompil...
Definition foray_renderstage.hpp:51
Definition foray_blitstage.hpp:4
Non owning context object.
Definition foray_context.hpp:16