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

Method GetParameterAnnotations

trinity/Shader/Tr2Shader.cpp:148–152  ·  view source on GitHub ↗

-------------------------------------------------------------------------------------- Description: Returns map of effect annotations for a given parameter or nullptr if the parameter is not found or it doesn't contain any annotations. Arguments: parameterName - Name of the effect parameter Return Value: Map of effect annotations or nullptr ---------------------------------------------------------

Source from the content-addressed store, hash-verified

146// Map of effect annotations or nullptr
147// --------------------------------------------------------------------------------------
148const Tr2EffectParameterAnnotationMap* Tr2Shader::GetParameterAnnotations( const char* parameterName ) const
149{
150 auto it = std::find_if( m_effect.annotations.begin(), m_effect.annotations.end(), [&]( Tr2EffectAnnotationMap::const_reference key ) { return strcmp( key.first, parameterName ) == 0; } );
151 return it == m_effect.annotations.end() ? nullptr : &it->second;
152}
153
154
155const Tr2EffectDescription& Tr2Shader::GetEffectDescription() const

Callers 4

PopulateParametersMethod · 0.80
GetBoolFunction · 0.80
RebuildEffectHandlesMethod · 0.80

Calls 2

beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected