Mandrill 2025.6.0
Loading...
Searching...
No Matches
Mandrill::Pipeline Class Reference

Pipeline class for managing Vulkan graphics pipelines. More...

#include <Pipeline.h>

Inheritance diagram for Mandrill::Pipeline:
Mandrill::RayTracingPipeline

Public Member Functions

MANDRILL_API Pipeline (ptr< Device > pDevice, ptr< Pass > pPass, ptr< Layout > pLayout, ptr< Shader > pShader, const PipelineDesc &desc=PipelineDesc())
 Create a new pipeline.
 
MANDRILL_API ~Pipeline ()
 Destructor for pipeline.
 
MANDRILL_API void bind (VkCommandBuffer cmd)
 Bind a pipeline for rendering and set its dynamic states.
 
MANDRILL_API void recreate ()
 Recreate a pipeline. Call this if shader source code has changed and should be reloaded.
 
MANDRILL_API VkPipeline getPipeline () const
 Get the pipeline handle.
 
MANDRILL_API VkPipelineLayout getLayout () const
 Get the pipeline layout handle.
 
MANDRILL_API void setCullMode (VkCullModeFlagBits cullMode)
 Set the cull mode.
 
MANDRILL_API void setFrontFace (VkFrontFace frontFace)
 Set the front face.
 
MANDRILL_API void setLineWidth (float lineWidth)
 Set line width.
 

Protected Member Functions

virtual void createPipeline ()
 
virtual void destroyPipeline ()
 

Protected Attributes

ptr< DevicempDevice
 
ptr< PassmpPass
 
ptr< ShadermpShader
 
ptr< LayoutmpLayout
 
VkPipeline mPipeline
 
VkPipelineLayout mPipelineLayout
 

Detailed Description

Pipeline class for managing Vulkan graphics pipelines.

Constructor & Destructor Documentation

◆ Pipeline()

Pipeline::Pipeline ( ptr< Device pDevice,
ptr< Pass pPass,
ptr< Layout pLayout,
ptr< Shader pShader,
const PipelineDesc &  desc = PipelineDesc() 
)

Create a new pipeline.

Parameters
pDeviceDevice to use
pPassPass to use
pLayoutLayout to use
pShaderShader to use
descDescription of pipeline

Member Function Documentation

◆ bind()

void Pipeline::bind ( VkCommandBuffer  cmd)

Bind a pipeline for rendering and set its dynamic states.

Parameters
cmdCommand buffer to use
Returns

◆ getLayout()

MANDRILL_API VkPipelineLayout Mandrill::Pipeline::getLayout ( ) const
inline

Get the pipeline layout handle.

Returns
Pipeline layout handle

◆ getPipeline()

MANDRILL_API VkPipeline Mandrill::Pipeline::getPipeline ( ) const
inline

Get the pipeline handle.

Returns
Pipeline handle

◆ recreate()

void Pipeline::recreate ( )

Recreate a pipeline. Call this if shader source code has changed and should be reloaded.

Returns

◆ setCullMode()

MANDRILL_API void Mandrill::Pipeline::setCullMode ( VkCullModeFlagBits  cullMode)
inline

Set the cull mode.

Parameters
cullModeNew cull mode
Returns

◆ setFrontFace()

MANDRILL_API void Mandrill::Pipeline::setFrontFace ( VkFrontFace  frontFace)
inline

Set the front face.

Parameters
frontFaceNew front face
Returns

◆ setLineWidth()

MANDRILL_API void Mandrill::Pipeline::setLineWidth ( float  lineWidth)
inline

Set line width.

Parameters
lineWidthNew line width
Returns

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