Castor3D 0.16.0
Multiplatform 3D engine
Public Member Functions | Protected Attributes | Friends | List of all members
castor3d::ShaderProgram Class Reference

#include <Program.hpp>

Inheritance diagram for castor3d::ShaderProgram:
Inheritance graph
[legend]
Collaboration diagram for castor3d::ShaderProgram:
Collaboration graph
[legend]

Public Member Functions

C3D_API ShaderProgram (castor::String const &name, RenderSystem &renderSystem)
 Constructor.
 
C3D_API void setFile (VkShaderStageFlagBits target, castor::Path const &pathFile)
 Sets the shader file.
 
C3D_API void setSource (VkShaderStageFlagBits target, castor::MbString const &source)
 Sets the shader source.
 
C3D_API void setSource (VkShaderStageFlagBits target, ShaderPtr shader)
 Sets the shader source.
 
C3D_API void setSource (ShaderPtr shader)
 Sets the program source.
 
C3D_API bool hasSource (ast::ShaderStage stage) const
 
ProgramModule const & getModule () const noexcept
 
ashes::PipelineShaderStageCreateInfoArray const & getStates () const noexcept
 
- Public Member Functions inherited from castor::NamedBaseT< T >
 NamedBaseT (T name) noexcept
 Constructor.
 
T const & getName () const noexcept
 Retrieves the name.
 
void rename (T name) noexcept
 
- Public Member Functions inherited from castor::OwnedBy< RenderSystem >
RenderSystem * getOwner () const
 

Protected Attributes

castor::Map< VkShaderStageFlagBits, castor::Pathm_files
 
ProgramModule m_module
 
ashes::PipelineShaderStageCreateInfoArray m_states
 
- Protected Attributes inherited from castor::NamedBaseT< T >
m_name
 

Friends

class castor::TextWriter< castor3d::ShaderProgram >
 

Additional Inherited Members

- Protected Member Functions inherited from castor::OwnedBy< RenderSystem >
 OwnedBy (RenderSystem &owner)
 Constructor.
 

Constructor & Destructor Documentation

◆ ShaderProgram()

C3D_API castor3d::ShaderProgram::ShaderProgram ( castor::String const & name,
RenderSystem & renderSystem )
explicit

Constructor.

Parameters
[in]nameThe program name.
[in]renderSystemThe RenderSystem.

Member Function Documentation

◆ getModule()

ProgramModule const & castor3d::ShaderProgram::getModule ( ) const
inlinenoexcept

name Getters.

◆ getStates()

ashes::PipelineShaderStageCreateInfoArray const & castor3d::ShaderProgram::getStates ( ) const
inlinenoexcept

References m_states.

◆ hasSource()

C3D_API bool castor3d::ShaderProgram::hasSource ( ast::ShaderStage stage) const
Parameters
[in]stageThe shader stage.
Returns
true if the shader program has a source for given shader stage.

◆ setFile()

C3D_API void castor3d::ShaderProgram::setFile ( VkShaderStageFlagBits target,
castor::Path const & pathFile )

Sets the shader file.

Parameters
[in]targetThe shader module concerned.
[in]pathFileThe file name.

◆ setSource() [1/3]

C3D_API void castor3d::ShaderProgram::setSource ( ShaderPtr shader)

Sets the program source.

Parameters
[in]shaderThe source shader.

◆ setSource() [2/3]

C3D_API void castor3d::ShaderProgram::setSource ( VkShaderStageFlagBits target,
castor::MbString const & source )

Sets the shader source.

Parameters
[in]targetThe shader object concerned.
[in]sourceThe source code.

◆ setSource() [3/3]

C3D_API void castor3d::ShaderProgram::setSource ( VkShaderStageFlagBits target,
ShaderPtr shader )

Sets the shader source.

Parameters
[in]targetThe shader object concerned.
[in]shaderThe source shader.

Friends And Related Symbol Documentation

◆ castor::TextWriter< castor3d::ShaderProgram >

Member Data Documentation

◆ m_files

castor::Map< VkShaderStageFlagBits, castor::Path > castor3d::ShaderProgram::m_files
protected

◆ m_module

ProgramModule castor3d::ShaderProgram::m_module
protected

◆ m_states

ashes::PipelineShaderStageCreateInfoArray castor3d::ShaderProgram::m_states
protected

Referenced by getStates().


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