Lysa  0.0
Lysa 3D Engine
Renderpass Class Reference

Detailed Description

Base class for a single stage in the renderer frame graph.

  • Encapsulate pipelines, descriptor layouts/sets, and render state for a specific step (e.g., depth pre-pass, G-Buffer, lighting, post FX).
  • Provide resize() and update() hooks to recreate resources when the swap chain changes or per-frame data needs refreshing.
+ Inheritance diagram for Renderpass:

Public Member Functions

 Renderpass (const RendererConfiguration &config, const std::string &name)
 
virtual void resize (const vireo::Extent &extent, const std::shared_ptr< vireo::CommandList > &commandList)
 
virtual void update (uint32 frameIndex)
 
virtual ~Renderpass () = default
 
 Renderpass (Renderpass &) = delete
 
Renderpass & operator= (Renderpass &) = delete
 

Static Public Member Functions

static void destroyShaderModules ()
 

Protected Member Functions

std::shared_ptr< vireo::ShaderModule > loadShader (const std::string &shaderName) const
 
void init (vireo::GraphicPipelineConfiguration &pipelineConfig, vireo::RenderingConfiguration &renderingConfig, const std::shared_ptr< vireo::DescriptorLayout > &descriptorLayout, bool withStencil)
 
void init (vireo::GraphicPipelineConfiguration &pipelineConfig, vireo::RenderingConfiguration &renderingConfig, bool withStencil) const
 
void initRendering (vireo::CommandList &commandList, const std::shared_ptr< vireo::Image > &image, const std::shared_ptr< vireo::GraphicPipeline > &pipeline, const std::shared_ptr< vireo::DescriptorSet > &sceneDescriptorSet, const std::shared_ptr< vireo::DescriptorSet > &descriptorSet)
 

Protected Attributes

const std::string name
 
const RendererConfigurationconfig
 

Static Protected Attributes

static std::mutex shaderModulesMutex
 
static std::unordered_map< std::string, std::shared_ptr< vireo::ShaderModule > > shaderModules
 

Constructor & Destructor Documentation

Renderpass ( const RendererConfiguration config,
const std::string &  name 
)

Constructs a render pass with a shared rendering configuration and name.

Parameters
configRendering configuration (frame buffering, formats).
nameHuman-readable name for debugging tools/logs.
virtual ~Renderpass ( )
virtualdefault
Renderpass ( Renderpass &  )
delete

Member Function Documentation

static void destroyShaderModules ( )
inlinestatic
void init ( vireo::GraphicPipelineConfiguration &  pipelineConfig,
vireo::RenderingConfiguration &  renderingConfig,
bool  withStencil 
) const
protected
void init ( vireo::GraphicPipelineConfiguration &  pipelineConfig,
vireo::RenderingConfiguration &  renderingConfig,
const std::shared_ptr< vireo::DescriptorLayout > &  descriptorLayout,
bool  withStencil 
)
protected
void initRendering ( vireo::CommandList &  commandList,
const std::shared_ptr< vireo::Image > &  image,
const std::shared_ptr< vireo::GraphicPipeline > &  pipeline,
const std::shared_ptr< vireo::DescriptorSet > &  sceneDescriptorSet,
const std::shared_ptr< vireo::DescriptorSet > &  descriptorSet 
)
protected
std::shared_ptr<vireo::ShaderModule> loadShader ( const std::string &  shaderName) const
protected

Utility to load a shader module by name (backend-agnostic).

Renderpass& operator= ( Renderpass &  )
delete
virtual void resize ( const vireo::Extent &  extent,
const std::shared_ptr< vireo::CommandList > &  commandList 
)
inlinevirtual
virtual void update ( uint32  frameIndex)
inlinevirtual

Member Data Documentation

const RendererConfiguration& config
protected

Shared rendering configuration.

const std::string name
protected

Debug/name label for the pass.

std::unordered_map<std::string, std::shared_ptr<vireo::ShaderModule> > shaderModules
staticprotected
std::mutex shaderModulesMutex
staticprotected