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

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

#include <VulkanRenderPass.h>

Inherits Raven::RenderPass.

Public Member Functions

ILLUMINE_API VulkanRenderPass (RenderPassSpecification spec)
 Constructs a VulkanRenderPass with the given specification.
virtual ~VulkanRenderPass ()=default
 Destructor, defaulted.
ILLUMINE_API void Release () override
ILLUMINE_API RenderPassSpecificationGetSpecification () override
 Gets a modifiable reference to the RenderPassSpecification.
ILLUMINE_API const RenderPassSpecificationGetSpecification () const override
 Gets a constant reference to the RenderPassSpecification.
ILLUMINE_API Ref< PipelineGetPipeline () const override
 Gets the pipeline associated with this render pass.
ILLUMINE_API Ref< FramebufferGetTargetFramebuffer () const
 Gets the framebuffer currently targeted by this render pass.
ILLUMINE_API void SetTargetFramebuffer (Ref< Framebuffer > framebuffer) override
 Sets the target framebuffer.
ILLUMINE_API void Bake () override
 Finalizes and prepares the render pass for execution.
ILLUMINE_API void UpdateShader (Ref< Shader > shader) override
ILLUMINE_API void BindDescriptorSets () override
ILLUMINE_API void BindDescriptorSets_RT (void *cmdBuf) override
ILLUMINE_API void SetInput (Ref< UniformBuffer > uniformBuffer, std::string_view name) override
 Binds a uniform buffer to the render pass inputs.
ILLUMINE_API void SetInput (Ref< StorageBuffer > storageBuffer, std::string_view name) override
ILLUMINE_API void SetInput (Ref< Image2D > image, std::string_view imageName, std::string_view samplerName) override
 Binds a texture and its sampler to the render pass inputs.
ILLUMINE_API void SetInput (Ref< Image2D > image, std::string_view imageName) override
ILLUMINE_API void SetInput (Ref< TextureCube > cubemap, std::string_view imageName, std::string_view samplerName) override
ILLUMINE_API Ref< Image2DGetOutput (u32 index) override
 Gets an output image from the render pass by index.
ILLUMINE_API 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::RefCounted
 RefCounted ()
virtual ~RefCounted ()
void IncRefCount ()
void DecRefCount ()
u32 GetRefCount () const

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 ( 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.

◆ BindDescriptorSets()

void Raven::VulkanRenderPass::BindDescriptorSets ( )
overridevirtual

Implements Raven::RenderPass.

◆ BindDescriptorSets_RT()

void Raven::VulkanRenderPass::BindDescriptorSets_RT ( void * cmdBuf)
overridevirtual

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]

ILLUMINE_API 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]

ILLUMINE_API 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
virtual

Gets the framebuffer currently targeted by this render pass.

Returns
Reference-counted pointer to the Framebuffer.

Implements Raven::RenderPass.

◆ Release()

void Raven::VulkanRenderPass::Release ( )
overridevirtual

Implements Raven::RenderPass.

◆ SetInput() [1/5]

void Raven::VulkanRenderPass::SetInput ( Ref< Image2D > image,
std::string_view imageName )
overridevirtual

Implements Raven::RenderPass.

◆ SetInput() [2/5]

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

void Raven::VulkanRenderPass::SetInput ( Ref< StorageBuffer > storageBuffer,
std::string_view name )
overridevirtual

Implements Raven::RenderPass.

◆ SetInput() [4/5]

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

Implements Raven::RenderPass.

◆ SetInput() [5/5]

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 ( Ref< Framebuffer > framebuffer)
overridevirtual

Sets the target framebuffer.

Parameters
framebufferReference-counted pointer to the new framebuffer.

Implements Raven::RenderPass.

◆ UpdateShader()

void Raven::VulkanRenderPass::UpdateShader ( Ref< Shader > shader)
overridevirtual

Implements Raven::RenderPass.


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