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

Vulkan implementation of the rendering Pipeline abstraction. More...

#include <VulkanPipeline.h>

Inheritance diagram for Raven::VulkanPipeline:
Raven::Pipeline

Public Member Functions

 VulkanPipeline (const PipelineSpecification &spec)
 Constructs a VulkanPipeline from the given specification.
virtual ~VulkanPipeline ()
 Cleans up Vulkan pipeline and layout handles.
void Release ()
PipelineSpecificationGetSpecification () override
 Gets a mutable reference to the pipeline specification.
const PipelineSpecificationGetSpecification () const override
 Gets a const reference to the pipeline specification.
void Invalidate () override
 Recreates the Vulkan pipeline using the current specification.
void Rebuild (const PipelineSpecification &spec) override
 Rebuilds the pipeline based on an updated Specification.
Ref< ShaderGetShader () const override
 Returns the shader currently associated with the pipeline.
VkPipeline GetVulkanPipeline () const
 Gets the Vulkan pipeline handle.
VkPipelineLayout GetLayout () const
 Gets the Vulkan pipeline layout handle.
Public Member Functions inherited from Raven::Pipeline
virtual ~Pipeline ()=default

Additional Inherited Members

Static Public Member Functions inherited from Raven::Pipeline
static Ref< PipelineCreate (const PipelineSpecification &spec)
 Factory method to create a Pipeline from a given specification.

Detailed Description

Vulkan implementation of the rendering Pipeline abstraction.

Manages the creation and lifecycle of a Vulkan graphics pipeline and its associated pipeline layout. Uses the given PipelineSpecification to configure shader stages, vertex input, rasterization, blending, etc. Supports invalidation to recreate the pipeline when specs change.

Constructor & Destructor Documentation

◆ VulkanPipeline()

Raven::VulkanPipeline::VulkanPipeline ( const PipelineSpecification & spec)

Constructs a VulkanPipeline from the given specification.

Parameters
specConfiguration describing shaders, layouts, vertex input, etc.

◆ ~VulkanPipeline()

Raven::VulkanPipeline::~VulkanPipeline ( )
virtual

Cleans up Vulkan pipeline and layout handles.

Member Function Documentation

◆ GetLayout()

VkPipelineLayout Raven::VulkanPipeline::GetLayout ( ) const
inline

Gets the Vulkan pipeline layout handle.

Returns
Vulkan pipeline layout handle.

◆ GetShader()

Ref< Shader > Raven::VulkanPipeline::GetShader ( ) const
inlineoverridevirtual

Returns the shader currently associated with the pipeline.

Returns
Reference-counted pointer to the shader.

Implements Raven::Pipeline.

◆ GetSpecification() [1/2]

const PipelineSpecification & Raven::VulkanPipeline::GetSpecification ( ) const
inlineoverridevirtual

Gets a const reference to the pipeline specification.

Returns
Const reference to the pipeline specification.

Implements Raven::Pipeline.

◆ GetSpecification() [2/2]

PipelineSpecification & Raven::VulkanPipeline::GetSpecification ( )
inlineoverridevirtual

Gets a mutable reference to the pipeline specification.

Returns
Reference to the pipeline specification used for this pipeline.

Implements Raven::Pipeline.

◆ GetVulkanPipeline()

VkPipeline Raven::VulkanPipeline::GetVulkanPipeline ( ) const
inline

Gets the Vulkan pipeline handle.

Returns
Vulkan pipeline handle.

◆ Invalidate()

void Raven::VulkanPipeline::Invalidate ( )
overridevirtual

Recreates the Vulkan pipeline using the current specification.

This invalidates the existing pipeline handle and creates a new one. Should be called whenever the specification changes.

Implements Raven::Pipeline.

◆ Rebuild()

void Raven::VulkanPipeline::Rebuild ( const PipelineSpecification & spec)
overridevirtual

Rebuilds the pipeline based on an updated Specification.

Parameters
specThe specification that has been changed.
Note
This is mostly useful for swapping out a shader for a given pipeline.
Warning
This does not update the Renderpass, nor does it rebake descriptors. Ensure that the descriptors of the old Shader match the new shader.

Implements Raven::Pipeline.

◆ Release()

void Raven::VulkanPipeline::Release ( )

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