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

Method ReleaseCachedData

trinity/Shader/Tr2Effect.cpp:842–868  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

840}
841
842void Tr2Effect::ReleaseCachedData( BlueAsyncRes* p )
843{
844 CCP_STATS_ZONE( __FUNCTION__ );
845 CCP_ASSERT( p == m_effectResource );
846 if( p == m_effectResource )
847 {
848 m_shader = nullptr;
849
850 const int numResources = (unsigned int)m_resources.size();
851 const int numParameters = (unsigned int)m_parameters.size();
852
853 // It's ok to pass in NULL values to these functions so that the parameters
854 // realize that they're not in use by a NULL technique etc.
855 // It's important to notify parameters of the fact that the effect
856 // has been reset
857 for( int i = 0; i < numParameters; i++ )
858 {
859 m_parameters[i]->RebuildEffectHandles( nullptr );
860 }
861
862 for( int i = 0; i < numResources; i++ )
863 {
864 m_resources[i]->RebuildEffectHandles( nullptr );
865 }
866 m_lodTextureParameters.clear();
867 }
868}
869
870// ---------------------------------------------------------------
871bool Tr2Effect::OnModified( Be::Var* value )

Callers

nothing calls this directly

Calls 2

sizeMethod · 0.80
RebuildEffectHandlesMethod · 0.45

Tested by

no test coverage detected