Pyrogenesis HEAD
Pyrogenesis, a RTS Engine
CShaderTechnique Class Reference

Implements a render technique consisting of a sequence of passes. More...

#include <ShaderTechnique.h>

Collaboration diagram for CShaderTechnique:

Public Types

using PipelineStateDescCallback = std::function< void(Renderer::Backend::SGraphicsPipelineStateDesc &pipelineStateDesc)>
 

Public Member Functions

 CShaderTechnique (const VfsPath &path, const CShaderDefines &defines, const PipelineStateDescCallback &callback)
 
void SetPasses (std::vector< CShaderPass > &&passes)
 
void SetComputePipelineState (std::unique_ptr< Renderer::Backend::IComputePipelineState > pipelineState, const CShaderProgramPtr &computeShader)
 
int GetNumPasses () const
 
Renderer::Backend::IShaderProgramGetShader (int pass=0) const
 
Renderer::Backend::IGraphicsPipelineStateGetGraphicsPipelineState (int pass=0) const
 
Renderer::Backend::IComputePipelineStateGetComputePipelineState () const
 
bool GetSortByDistance () const
 Whether this technique uses alpha blending that requires objects to be drawn from furthest to nearest. More...
 
void SetSortByDistance (bool enable)
 
const VfsPathGetPath ()
 
const CShaderDefinesGetShaderDefines ()
 
const PipelineStateDescCallbackGetPipelineStateDescCallback () const
 

Private Attributes

std::vector< CShaderPassm_Passes
 
bool m_SortByDistance = false
 
VfsPath m_Path
 
CShaderDefines m_Defines
 
PipelineStateDescCallback m_PipelineStateDescCallback
 
std::unique_ptr< Renderer::Backend::IComputePipelineStatem_ComputePipelineState
 
CShaderProgramPtr m_ComputeShader
 

Detailed Description

Implements a render technique consisting of a sequence of passes.

CShaderManager loads these from shader effect XML files.

Member Typedef Documentation

◆ PipelineStateDescCallback

Constructor & Destructor Documentation

◆ CShaderTechnique()

CShaderTechnique::CShaderTechnique ( const VfsPath path,
const CShaderDefines defines,
const PipelineStateDescCallback callback 
)

Member Function Documentation

◆ GetComputePipelineState()

Renderer::Backend::IComputePipelineState * CShaderTechnique::GetComputePipelineState ( ) const

◆ GetGraphicsPipelineState()

Renderer::Backend::IGraphicsPipelineState * CShaderTechnique::GetGraphicsPipelineState ( int  pass = 0) const

◆ GetNumPasses()

int CShaderTechnique::GetNumPasses ( ) const

◆ GetPath()

const VfsPath & CShaderTechnique::GetPath ( )
inline

◆ GetPipelineStateDescCallback()

const PipelineStateDescCallback & CShaderTechnique::GetPipelineStateDescCallback ( ) const
inline

◆ GetShader()

Renderer::Backend::IShaderProgram * CShaderTechnique::GetShader ( int  pass = 0) const

◆ GetShaderDefines()

const CShaderDefines & CShaderTechnique::GetShaderDefines ( )
inline

◆ GetSortByDistance()

bool CShaderTechnique::GetSortByDistance ( ) const

Whether this technique uses alpha blending that requires objects to be drawn from furthest to nearest.

◆ SetComputePipelineState()

void CShaderTechnique::SetComputePipelineState ( std::unique_ptr< Renderer::Backend::IComputePipelineState pipelineState,
const CShaderProgramPtr computeShader 
)

◆ SetPasses()

void CShaderTechnique::SetPasses ( std::vector< CShaderPass > &&  passes)

◆ SetSortByDistance()

void CShaderTechnique::SetSortByDistance ( bool  enable)

Member Data Documentation

◆ m_ComputePipelineState

std::unique_ptr<Renderer::Backend::IComputePipelineState> CShaderTechnique::m_ComputePipelineState
private

◆ m_ComputeShader

CShaderProgramPtr CShaderTechnique::m_ComputeShader
private

◆ m_Defines

CShaderDefines CShaderTechnique::m_Defines
private

◆ m_Passes

std::vector<CShaderPass> CShaderTechnique::m_Passes
private

◆ m_Path

VfsPath CShaderTechnique::m_Path
private

◆ m_PipelineStateDescCallback

PipelineStateDescCallback CShaderTechnique::m_PipelineStateDescCallback
private

◆ m_SortByDistance

bool CShaderTechnique::m_SortByDistance = false
private

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