2#include "../core/foray_core_declares.hpp"
3#include "../rtpipe/foray_rtpipeline.hpp"
4#include "../scene/foray_scene_declares.hpp"
5#include "../util/foray_pipelinelayout.hpp"
28 virtual void Resize(
const VkExtent2D& extent)
override;
Context used for render processes. This object is rebuilt for every frame. /.
Definition foray_framerenderinfo.hpp:14
Helper class wrapping 4 SBTs (Raygen, Miss, Callable, Hitgroup) and a raytracing pipeline.
Definition foray_rtpipeline.hpp:15
Minimalist setup for a Raytracing Stage.
Definition foray_minimalraytracingstage.hpp:19
virtual void ApiCreatePipelineLayout()=0
Inheriting types should create mPipelineLayout here (add descriptorsetlayouts, add pushconstants,...
virtual void ApiCustomObjectsDestroy()
Inheriting types may use this function to destroy options created during ApiCustomObjectsCreate()
Definition foray_minimalraytracingstage.hpp:47
virtual void ApiDestroyRtPipeline()=0
Destroys mPipeline and all shaders registered to RenderStage::mShaders.
virtual void ApiCreateOutputImages()
Inheriting types should setup their Output Images here and push them onto the RenderStage::mImageOutp...
Definition foray_minimalraytracingstage.hpp:35
virtual void ApiCreateOrUpdateDescriptors()
Inheriting types should reassign all descriptor bindings and call create / update on descriptor sets.
Definition foray_minimalraytracingstage.hpp:50
virtual void ReloadShaders() override
Calls ApiDestroyRtPipeline(), ApiCreateRtPipeline() in this order.
rtpipe::RtPipeline mPipeline
The pipeline manages shader binding tables.
Definition foray_minimalraytracingstage.hpp:67
void Init(core::Context *context)
Destroys, assigns context, calls ApiCreateOutputImages(), ApiCustomObjectsCreate(),...
virtual void ApiDestroyDescriptors()
Inheriting types should destroy all descriptor sets used here.
Definition foray_minimalraytracingstage.hpp:52
util::PipelineLayout mPipelineLayout
The pipeline layout manages descriptorset and pushconstant layouts.
Definition foray_minimalraytracingstage.hpp:65
virtual void ApiRecordFrameTraceRays(VkCommandBuffer cmdBuffer, base::FrameRenderInfo &renderInfo)=0
Inheriting types should use this to push constants and invoke tracerays.
virtual void Resize(const VkExtent2D &extent) override
Calls RenderStage::Resize(..) which resizes any image registered to mImageOutputs,...
virtual void ApiRecordFrameBind(VkCommandBuffer cmdBuffer, base::FrameRenderInfo &renderInfo)=0
Inheriting types should use this to bind the RtPipeline and all descriptor sets.
virtual void ApiRecordFramePrepare(VkCommandBuffer cmdBuffer, base::FrameRenderInfo &renderInfo)
Inheriting types should use this for pipeline barriers and stage specific buffer actions.
Definition foray_minimalraytracingstage.hpp:55
virtual void Destroy() override
Calls ApiDestroyRtPipeline(), mPipelineLayout.Destroy(), ApiDestroyDescriptors(), ApiCustomObjectsDes...
virtual void ApiCustomObjectsCreate()
Inheriting types may use this function to initialize stage specific objects such as configuration Ubo...
Definition foray_minimalraytracingstage.hpp:45
virtual void ApiCreateRtPipeline()=0
Inheriting types should create mPipeline here (load shaders, configure sbts, build)
virtual void RecordFrame(VkCommandBuffer cmdBuffer, base::FrameRenderInfo &renderInfo) override
Calls ApiRecordFramePrepare(), ApiRecordFrameBind(), ApiRecordFrameTraceRays() in this order.
Render stage base class giving a common interface for rendering processes.
Definition foray_renderstage.hpp:15
Class that holds memory ownership of a vulkan pipeline layout.
Definition foray_pipelinelayout.hpp:12
Definition foray_blitstage.hpp:4
Non owning context object.
Definition foray_context.hpp:16