//------------------------------ bool LibraryEffectsLoader::end__profile_COMMON() { // Store values original transparency and transparent values mCurrentEffect->getCommonEffects ().back ()->setTransparent (mTransparent); mCurrentEffect->getCommonEffects ().back ()->setTransparency(mTransparency); mCurrentEffect->getCommonEffects ().back ()->setOpaqueMode((COLLADAFW::EffectCommon::OpaqueMode)mOpaqueMode); // Calculate the opacity value. calculateOpacity (); const COLLADAFW::PointerArray<COLLADAFW::TextureAttributes>& effectTextures = mCurrentEffect->getExtraTextures(); handleExtraEffectTextures( effectTextures ); // Fill the array of samplers of the current profile. if ( !fillSamplerArray() ) return false; SidSamplerInfoMap::iterator samplerIt = mEffectProfileSidSamplerInfoMap.begin(); for ( ; samplerIt != mEffectProfileSidSamplerInfoMap.end(); ++samplerIt) { SamplerInfo& samplerInfo = samplerIt->second; delete samplerInfo.sampler; } mEffectProfileSidSamplerInfoMap.clear(); mEffectProfileSidSurfaceMap.clear(); mEffectProfileSamplersMap.clear (); mNextSamplerIndex = 0; mTransparent.getColor ().set ( -1, -1, -1, -1 ); mCurrentProfile = PROFILE_NONE; moveUpInSidTree(); return true; }
//------------------------------ bool LibraryEffectsLoader::end__profile_COMMON() { // Calculate the opacity value. calculateOpacity (); // Fill the array of samplers of the current profile. if ( !fillSamplerArray() ) return false; SidSamplerInfoMap::iterator samplerIt = mEffectProfileSidSamplerInfoMap.begin(); for ( ; samplerIt != mEffectProfileSidSamplerInfoMap.end(); ++samplerIt) { SamplerInfo& samplerInfo = samplerIt->second; delete samplerInfo.sampler; } mEffectProfileSidSamplerInfoMap.clear(); mEffectProfileSidSurfaceMap.clear(); mEffectProfileSamplersMap.clear (); mNextSamplerIndex = 0; mTransparent.getColor ().set ( -1, -1, -1, -1 ); mCurrentProfile = PROFILE_NONE; moveUpInSidTree(); return true; }