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

Shader class that abstracts the handling of Vulkan shaders. This class manages shader modules and hot reloading of shader source code during execution. More...

#include <Shader.h>

Public Member Functions

MANDRILL_API Shader (ptr< Device > pDevice, const std::vector< ShaderDesc > &desc)
 Create a new shader.
 
MANDRILL_API ~Shader ()
 Destructor for shader.
 
MANDRILL_API void reload ()
 Reload shader code from disk and recompile it.
 
MANDRILL_API std::vector< VkShaderModule > getModules () const
 Get shader module handles.
 
MANDRILL_API std::vector< VkPipelineShaderStageCreateInfo > getStages () const
 Get pipeline shader stage create infos.
 

Detailed Description

Shader class that abstracts the handling of Vulkan shaders. This class manages shader modules and hot reloading of shader source code during execution.

Constructor & Destructor Documentation

◆ Shader()

Shader::Shader ( ptr< Device pDevice,
const std::vector< ShaderDesc > &  desc 
)

Create a new shader.

Parameters
pDeviceDevice to use
descDescription of shader being created

Member Function Documentation

◆ getModules()

MANDRILL_API std::vector< VkShaderModule > Mandrill::Shader::getModules ( ) const
inline

Get shader module handles.

Returns
Vector of shader module handles

◆ getStages()

MANDRILL_API std::vector< VkPipelineShaderStageCreateInfo > Mandrill::Shader::getStages ( ) const
inline

Get pipeline shader stage create infos.

Returns
Vector of pipeline shader stage create infos

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