MCPcopy Create free account
hub / github.com/carbonengine/trinity / ApplyShaderProgram

Method ApplyShaderProgram

trinity/Shader/Tr2EffectStateManager.cpp:758–778  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

756}
757
758void Tr2EffectStateManager::ApplyShaderProgram( uint32_t ix )
759{
760 if( m_isManagedRendering )
761 {
762 if( ix == m_currentValues.m_shaderProgram )
763 {
764 return;
765 }
766
767 m_currentValues.m_shaderProgram = ix;
768 }
769
770 if( ix < s_shaderPrograms.size() )
771 {
772 m_renderContext.SetShaderProgram( *s_shaderPrograms[ix].first );
773 }
774 else
775 {
776 m_renderContext.SetShaderProgram( Tr2ShaderProgramAL() );
777 }
778}
779
780Tr2ShaderProgramAL* Tr2EffectStateManager::GetShaderProgram( uint32_t ix )
781{

Callers 3

ApplyAllStateForPassMethod · 0.80
ApplyShaderOverrideMethod · 0.80
TransformMeshesMethod · 0.80

Calls 3

sizeMethod · 0.80
Tr2ShaderProgramALClass · 0.50
SetShaderProgramMethod · 0.45

Tested by

no test coverage detected