Simplification of LLPrimitive::setVolume ala davep. Have had this for a while, I just never commited until now. Haven't noticed any misbehavior with this alteration, and I'm tired of it going uncommited.

This commit is contained in:
Shyotl
2011-07-18 04:18:12 -05:00
parent fd35e86ddb
commit 52570a7f61

View File

@@ -744,7 +744,11 @@ BOOL LLPrimitive::setVolume(const LLVolumeParams &volume_params, const S32 detai
setNumTEs(mVolumep->getNumFaces());
return TRUE;
}
#if 0
// #if 0'd out by davep
// this is a lot of cruft to set texture entry values that just stay the same for LOD switch
// or immediately get overridden by an object update message, also crashes occasionally
U32 old_face_mask = mVolumep->mFaceMask;
S32 face_bit = 0;
@@ -942,6 +946,13 @@ BOOL LLPrimitive::setVolume(const LLVolumeParams &volume_params, const S32 detai
setTE(te_num, *(old_tes.getTexture(face_mapping[face_bit])));
}
}
#else
// build the new object
sVolumeManager->unrefVolume(mVolumep);
mVolumep = volumep;
setNumTEs(mVolumep->getNumFaces());
#endif
return TRUE;
}