Raven Engine v0.1
Loading...
Searching...
No Matches
Raven::RenderPass Class Referenceabstract

Interface representing a GPU render pass abstraction. More...

#include <RenderPass.h>

Inheritance diagram for Raven::RenderPass:
Raven::Castable< RenderPass > Raven::VulkanRenderPass

Public Member Functions

virtual ~RenderPass ()=default
virtual RenderPassSpecificationGetSpecification ()=0
 Access mutable render pass specification.
virtual const RenderPassSpecificationGetSpecification () const =0
 Access const render pass specification.
virtual void Bake ()=0
 Prepare the render pass after setting pipeline and inputs.
virtual void SetInput (Ref< UniformBuffer > uniformBuffer, std::string_view name)=0
 Bind a uniform buffer as input by name.
virtual void SetInput (Ref< Texture2D > texture, std::string_view imageName, std::string_view samplerName)=0
 Bind a texture with associated sampler by name.
virtual Ref< Image2DGetOutput (u32 index)=0
 Retrieve output image at specified index (color attachments).
virtual Ref< Image2DGetDepthOutput ()=0
 Retrieve the depth attachment output image.
virtual Ref< PipelineGetPipeline () const =0
 Get the associated pipeline.
Public Member Functions inherited from Raven::Castable< RenderPass >
T & As ()
 Non-const version of As<T>(), for casting to a non-const target type.

Static Public Member Functions

static Ref< RenderPassCreate (const RenderPassSpecification &spec)
 Factory method to create a RenderPass from specification.

Detailed Description

Interface representing a GPU render pass abstraction.

RenderPass encapsulates a specific rendering phase. It manages resource bindings, pipeline association, and provides output targets.

Usage:

  • Configure via specification and bind inputs.
  • Call Bake() to prepare internal GPU resources.
  • Query outputs (color and depth).

Constructor & Destructor Documentation

◆ ~RenderPass()

virtual Raven::RenderPass::~RenderPass ( )
virtualdefault

Member Function Documentation

◆ Bake()

virtual void Raven::RenderPass::Bake ( )
pure virtual

Prepare the render pass after setting pipeline and inputs.

This typically allocates or updates GPU resources internally.

Implemented in Raven::VulkanRenderPass.

◆ Create()

Ref< RenderPass > Raven::RenderPass::Create ( const RenderPassSpecification & spec)
static

Factory method to create a RenderPass from specification.

Parameters
specThe render pass configuration.
Returns
Reference to newly created RenderPass.

◆ GetDepthOutput()

virtual Ref< Image2D > Raven::RenderPass::GetDepthOutput ( )
pure virtual

Retrieve the depth attachment output image.

Returns
Reference to Image2D representing the depth output.

Implemented in Raven::VulkanRenderPass.

◆ GetOutput()

virtual Ref< Image2D > Raven::RenderPass::GetOutput ( u32 index)
pure virtual

Retrieve output image at specified index (color attachments).

Parameters
indexOutput attachment index.
Returns
Reference to Image2D representing the color output.

Implemented in Raven::VulkanRenderPass.

◆ GetPipeline()

virtual Ref< Pipeline > Raven::RenderPass::GetPipeline ( ) const
pure virtual

Get the associated pipeline.

Returns
Reference to the pipeline used by this render pass.

Implemented in Raven::VulkanRenderPass.

◆ GetSpecification() [1/2]

virtual const RenderPassSpecification & Raven::RenderPass::GetSpecification ( ) const
pure virtual

Access const render pass specification.

Returns
Const reference to RenderPassSpecification.

Implemented in Raven::VulkanRenderPass.

◆ GetSpecification() [2/2]

virtual RenderPassSpecification & Raven::RenderPass::GetSpecification ( )
pure virtual

Access mutable render pass specification.

Returns
Reference to RenderPassSpecification.

Implemented in Raven::VulkanRenderPass.

◆ SetInput() [1/2]

virtual void Raven::RenderPass::SetInput ( Ref< Texture2D > texture,
std::string_view imageName,
std::string_view samplerName )
pure virtual

Bind a texture with associated sampler by name.

Parameters
textureTexture2D to bind.
imageNameName of the texture image in shader.
samplerNameName of the sampler in shader.

Implemented in Raven::VulkanRenderPass.

◆ SetInput() [2/2]

virtual void Raven::RenderPass::SetInput ( Ref< UniformBuffer > uniformBuffer,
std::string_view name )
pure virtual

Bind a uniform buffer as input by name.

Parameters
uniformBufferUniform buffer to bind.
nameName identifier in the shader.

Implemented in Raven::VulkanRenderPass.


The documentation for this class was generated from the following files: