Raven Engine v0.1
Loading...
Searching...
No Matches
Raven::VulkanRenderPass Class Reference

Vulkan-specific implementation of a RenderPass. More...

#include <VulkanRenderPass.h>

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

Public Member Functions

 VulkanRenderPass (const RenderPassSpecification &spec)
 Constructs a VulkanRenderPass with the given specification.
virtual ~VulkanRenderPass ()=default
 Destructor, defaulted.
RenderPassSpecificationGetSpecification () override
 Gets a modifiable reference to the RenderPassSpecification.
const RenderPassSpecificationGetSpecification () const override
 Gets a constant reference to the RenderPassSpecification.
Ref< PipelineGetPipeline () const override
 Gets the pipeline associated with this render pass.
Ref< FramebufferGetTargetFramebuffer () const
 Gets the framebuffer currently targeted by this render pass.
void SetTargetFramebuffer (const Ref< Framebuffer > framebuffer)
 Sets the target framebuffer.
void Bake () override
 Finalizes and prepares the render pass for execution.
void SetInput (Ref< UniformBuffer > uniformBuffer, std::string_view name) override
 Binds a uniform buffer to the render pass inputs.
void SetInput (Ref< Texture2D > texture, std::string_view imageName, std::string_view samplerName) override
 Binds a texture and its sampler to the render pass inputs.
Ref< Image2DGetOutput (u32 index) override
 Gets an output image from the render pass by index.
Ref< Image2DGetDepthOutput () override
 Gets the depth output image from the render pass.
Public Member Functions inherited from Raven::RenderPass
virtual ~RenderPass ()=default
Public Member Functions inherited from Raven::Castable< RenderPass >
T & As ()
 Non-const version of As<T>(), for casting to a non-const target type.

Additional Inherited Members

Static Public Member Functions inherited from Raven::RenderPass
static Ref< RenderPassCreate (const RenderPassSpecification &spec)
 Factory method to create a RenderPass from specification.

Detailed Description

Vulkan-specific implementation of a RenderPass.

Manages Vulkan pipeline, framebuffer targets, and descriptor sets. Handles input bindings for uniform buffers and textures via DescriptorSetManager.

Constructor & Destructor Documentation

◆ VulkanRenderPass()

Raven::VulkanRenderPass::VulkanRenderPass ( const RenderPassSpecification & spec)

Constructs a VulkanRenderPass with the given specification.

Parameters
specThe render pass specification defining pipeline, framebuffer, etc.

◆ ~VulkanRenderPass()

virtual Raven::VulkanRenderPass::~VulkanRenderPass ( )
virtualdefault

Destructor, defaulted.

Member Function Documentation

◆ Bake()

void Raven::VulkanRenderPass::Bake ( )
overridevirtual

Finalizes and prepares the render pass for execution.

Typically sets up descriptor sets and other Vulkan resources.

Implements Raven::RenderPass.

◆ GetDepthOutput()

Ref< Image2D > Raven::VulkanRenderPass::GetDepthOutput ( )
overridevirtual

Gets the depth output image from the render pass.

Returns
Reference-counted pointer to the depth Image2D, or nullptr if no depth attachment.

Implements Raven::RenderPass.

◆ GetOutput()

Ref< Image2D > Raven::VulkanRenderPass::GetOutput ( u32 index)
overridevirtual

Gets an output image from the render pass by index.

Parameters
indexIndex of the output image to retrieve.
Returns
Reference-counted pointer to the Image2D, or nullptr if invalid index.

Implements Raven::RenderPass.

◆ GetPipeline()

Ref< Pipeline > Raven::VulkanRenderPass::GetPipeline ( ) const
overridevirtual

Gets the pipeline associated with this render pass.

Returns
Reference-counted pointer to the Pipeline.

Implements Raven::RenderPass.

◆ GetSpecification() [1/2]

const RenderPassSpecification & Raven::VulkanRenderPass::GetSpecification ( ) const
inlineoverridevirtual

Gets a constant reference to the RenderPassSpecification.

Returns
Constant reference to the specification.

Implements Raven::RenderPass.

◆ GetSpecification() [2/2]

RenderPassSpecification & Raven::VulkanRenderPass::GetSpecification ( )
inlineoverridevirtual

Gets a modifiable reference to the RenderPassSpecification.

Returns
Reference to the specification.

Implements Raven::RenderPass.

◆ GetTargetFramebuffer()

Ref< Framebuffer > Raven::VulkanRenderPass::GetTargetFramebuffer ( ) const

Gets the framebuffer currently targeted by this render pass.

Returns
Reference-counted pointer to the Framebuffer.

◆ SetInput() [1/2]

void Raven::VulkanRenderPass::SetInput ( Ref< Texture2D > texture,
std::string_view imageName,
std::string_view samplerName )
overridevirtual

Binds a texture and its sampler to the render pass inputs.

Parameters
textureThe texture to bind.
imageNameThe name of the image resource in the shader.
samplerNameThe name of the sampler resource in the shader.

Implements Raven::RenderPass.

◆ SetInput() [2/2]

void Raven::VulkanRenderPass::SetInput ( Ref< UniformBuffer > uniformBuffer,
std::string_view name )
overridevirtual

Binds a uniform buffer to the render pass inputs.

Parameters
uniformBufferThe uniform buffer to bind.
nameThe name of the uniform buffer in the shader.

Implements Raven::RenderPass.

◆ SetTargetFramebuffer()

void Raven::VulkanRenderPass::SetTargetFramebuffer ( const Ref< Framebuffer > framebuffer)
inline

Sets the target framebuffer.

Note
Currently empty implementation.
Parameters
framebufferReference-counted pointer to the new framebuffer.

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