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

Method AddLoddable

trinity/Shader/Tr2Effect.cpp:2029–2048  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2027}
2028
2029void Tr2Effect::AddLoddable( ITriEffectParameter* param, const char* name )
2030{
2031 if( ITriEffectTextureParameterPtr loddable = BlueCastPtr( param ) )
2032 {
2033 auto found = find( begin( m_lodTextureParameters ), end( m_lodTextureParameters ), loddable );
2034 if( found == end( m_lodTextureParameters ) )
2035 {
2036 std::array<float, ITriEffectTextureParameter::UV_SET_MAX_COUNT> uvScale;
2037 if( ExtractLodingAnnotations( uvScale, name, m_shader->GetEffectDescription().annotations, m_constParameters ) )
2038 {
2039 loddable->EnableTextureLoding( uvScale );
2040 }
2041 else
2042 {
2043 loddable->DisableTextureLoding();
2044 }
2045 m_lodTextureParameters.push_back( loddable );
2046 }
2047 }
2048}
2049
2050void Tr2Effect::SetVariableStore( Tr2VariableStore* variableStore )
2051{

Callers

nothing calls this directly

Calls 5

ExtractLodingAnnotationsFunction · 0.85
EnableTextureLodingMethod · 0.80
DisableTextureLodingMethod · 0.80
beginFunction · 0.50
endFunction · 0.50

Tested by

no test coverage detected