Raven Engine v0.1
Loading...
Searching...
No Matches
Raven::Shader Class Referenceabstract

Represents a complete shader composed of multiple shader stage modules. More...

#include <Shader.h>

Inheritance diagram for Raven::Shader:
Raven::VulkanShader

Public Member Functions

virtual ~Shader ()=default
virtual const std::string & GetName () const =0
 Gets the shader's identifying name.
virtual const std::string & GetFilePath () const =0
 Returns the Path to the shader.
virtual std::unordered_map< ShaderStage, Ref< ShaderModuleHandle > > GetShaderModules () const =0
 Returns the collection of shader modules keyed by shader stage.

Static Public Member Functions

static Ref< ShaderCreate (const std::string &filepath, bool forceCompile=false, bool disableOptimizations=false)
 Factory method to create a shader from a file.

Detailed Description

Represents a complete shader composed of multiple shader stage modules.

Responsible for loading and managing shader modules, typically from file. Supports retrieval of contained shader modules and querying shader name.

Constructor & Destructor Documentation

◆ ~Shader()

virtual Raven::Shader::~Shader ( )
virtualdefault

Member Function Documentation

◆ Create()

Ref< Shader > Raven::Shader::Create ( const std::string & filepath,
bool forceCompile = false,
bool disableOptimizations = false )
static

Factory method to create a shader from a file.

Parameters
filepathPath to the shader source or binary.
forceCompileIf true, forces recompilation of the shader.
disableOptimizationsDisables optimizations during compilation.
Returns
Reference to the created Shader.

◆ GetFilePath()

virtual const std::string & Raven::Shader::GetFilePath ( ) const
pure virtual

Returns the Path to the shader.

Returns
Const reference to the shader path string.

Implemented in Raven::VulkanShader.

◆ GetName()

virtual const std::string & Raven::Shader::GetName ( ) const
pure virtual

Gets the shader's identifying name.

Returns
Const reference to shader name string.

Implemented in Raven::VulkanShader.

◆ GetShaderModules()

virtual std::unordered_map< ShaderStage, Ref< ShaderModuleHandle > > Raven::Shader::GetShaderModules ( ) const
pure virtual

Returns the collection of shader modules keyed by shader stage.

Used internally for pipeline creation and module access.

Returns
Map of ShaderStage to ShaderModuleHandle references.

Implemented in Raven::VulkanShader.


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