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

Method GetTechniqueIndex

trinity/Shader/Tr2Shader.cpp:28–48  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

26}
27
28bool Tr2Shader::GetTechniqueIndex( const BlueSharedString& name, uint32_t& index ) const
29{
30 if( m_effect.techniques.empty() )
31 {
32 return false;
33 }
34 if( name == ANY_TECHNIQUE )
35 {
36 index = 0;
37 return true;
38 }
39 for( size_t i = 0; i < m_effect.techniques.size(); ++i )
40 {
41 if( m_effect.techniques[i].name == name )
42 {
43 index = uint32_t( i );
44 return true;
45 }
46 }
47 return false;
48}
49
50// --------------------------------------------------------------------------------------
51unsigned int Tr2Shader::GetPassCount( uint32_t techniqueIndex ) const

Callers 15

RenderFogMethod · 0.80
UseTexturesFunction · 0.80
RenderBatchesInOrderMethod · 0.80
TechniqueInBatchMethod · 0.80
RenderBatchGroupMethod · 0.80
RenderGdprBatchesMethod · 0.80
RunComputeShaderMethod · 0.80
CompatibleWithGdrMethod · 0.80
RenderShadowsMethod · 0.80

Calls 2

emptyMethod · 0.80
sizeMethod · 0.80

Tested by

no test coverage detected