| 840 | } |
| 841 | |
| 842 | void 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 | // --------------------------------------------------------------- |
| 871 | bool Tr2Effect::OnModified( Be::Var* value ) |
nothing calls this directly
no test coverage detected