Raven Engine v0.1
A modern 3D Game Engine
Loading...
Searching...
No Matches
Raven::RenderPass Class Referenceabstract

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

#include <RenderPass.h>

Inherits Raven::RefCounted.

Inherited by Raven::VulkanRenderPass.

Public Member Functions

virtual ~RenderPass ()=default
virtual void Release ()=0
virtual RenderPassSpecificationGetSpecification ()=0
 Access mutable render pass specification.
virtual const RenderPassSpecificationGetSpecification () const =0
 Access const render pass specification.
virtual Ref< FramebufferGetTargetFramebuffer () const =0
virtual void SetTargetFramebuffer (Ref< Framebuffer > framebuffer)=0
virtual void BindDescriptorSets ()=0
virtual void BindDescriptorSets_RT (void *cmdBuf)=0
virtual void Bake ()=0
 Prepare the render pass after setting pipeline and inputs.
virtual void UpdateShader (Ref< Shader > shader)=0
virtual void SetInput (Ref< UniformBuffer > uniformBuffer, std::string_view name)=0
 Bind a uniform buffer as input by name.
virtual void SetInput (Ref< StorageBuffer > storageBuffer, std::string_view name)=0
virtual void SetInput (Ref< Image2D > image, std::string_view imageName, std::string_view samplerName)=0
 Bind a texture with associated sampler by name.
virtual void SetInput (Ref< Image2D > image, std::string_view imageName)=0
virtual void SetInput (Ref< TextureCube > cubemap, std::string_view imageName, std::string_view samplerName)=0
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::RefCounted
 RefCounted ()
virtual ~RefCounted ()
void IncRefCount ()
void DecRefCount ()
u32 GetRefCount () const

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.

◆ BindDescriptorSets()

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

Implemented in Raven::VulkanRenderPass.

◆ BindDescriptorSets_RT()

virtual void Raven::RenderPass::BindDescriptorSets_RT ( void * cmdBuf)
pure virtual

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.

◆ GetTargetFramebuffer()

virtual Ref< Framebuffer > Raven::RenderPass::GetTargetFramebuffer ( ) const
pure virtual

Implemented in Raven::VulkanRenderPass.

◆ Release()

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

Implemented in Raven::VulkanRenderPass.

◆ SetInput() [1/5]

virtual void Raven::RenderPass::SetInput ( Ref< Image2D > image,
std::string_view imageName )
pure virtual

Implemented in Raven::VulkanRenderPass.

◆ SetInput() [2/5]

virtual void Raven::RenderPass::SetInput ( Ref< Image2D > image,
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() [3/5]

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

Implemented in Raven::VulkanRenderPass.

◆ SetInput() [4/5]

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

Implemented in Raven::VulkanRenderPass.

◆ SetInput() [5/5]

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.

◆ SetTargetFramebuffer()

virtual void Raven::RenderPass::SetTargetFramebuffer ( Ref< Framebuffer > framebuffer)
pure virtual

Implemented in Raven::VulkanRenderPass.

◆ UpdateShader()

virtual void Raven::RenderPass::UpdateShader ( Ref< Shader > shader)
pure virtual

Implemented in Raven::VulkanRenderPass.


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