diff options
author | Jacek Antonelli | 2008-08-15 23:45:54 -0500 |
---|---|---|
committer | Jacek Antonelli | 2008-08-15 23:45:54 -0500 |
commit | d0b03a62fd799317d5da0bd56615739ce3b5b052 (patch) | |
tree | 8bc79bbbb52e18294f62810d9fa66ce136f90e2d /linden/indra/newview/lldrawable.cpp | |
parent | Second Life viewer sources 1.20.8 (diff) | |
download | meta-impy-d0b03a62fd799317d5da0bd56615739ce3b5b052.zip meta-impy-d0b03a62fd799317d5da0bd56615739ce3b5b052.tar.gz meta-impy-d0b03a62fd799317d5da0bd56615739ce3b5b052.tar.bz2 meta-impy-d0b03a62fd799317d5da0bd56615739ce3b5b052.tar.xz |
Second Life viewer sources 1.20.9
Diffstat (limited to 'linden/indra/newview/lldrawable.cpp')
-rw-r--r-- | linden/indra/newview/lldrawable.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/linden/indra/newview/lldrawable.cpp b/linden/indra/newview/lldrawable.cpp index ba7d6b9..db57509 100644 --- a/linden/indra/newview/lldrawable.cpp +++ b/linden/indra/newview/lldrawable.cpp | |||
@@ -122,6 +122,7 @@ void LLDrawable::destroy() | |||
122 | sNumZombieDrawables--; | 122 | sNumZombieDrawables--; |
123 | } | 123 | } |
124 | 124 | ||
125 | LLFace::sDeleteLock = mFaces.size() ; | ||
125 | std::for_each(mFaces.begin(), mFaces.end(), DeletePointer()); | 126 | std::for_each(mFaces.begin(), mFaces.end(), DeletePointer()); |
126 | mFaces.clear(); | 127 | mFaces.clear(); |
127 | 128 | ||
@@ -184,6 +185,7 @@ void LLDrawable::cleanupReferences() | |||
184 | { | 185 | { |
185 | LLFastTimer t(LLFastTimer::FTM_PIPELINE); | 186 | LLFastTimer t(LLFastTimer::FTM_PIPELINE); |
186 | 187 | ||
188 | LLFace::sDeleteLock = mFaces.size() ; | ||
187 | std::for_each(mFaces.begin(), mFaces.end(), DeletePointer()); | 189 | std::for_each(mFaces.begin(), mFaces.end(), DeletePointer()); |
188 | mFaces.clear(); | 190 | mFaces.clear(); |
189 | 191 | ||
@@ -277,6 +279,7 @@ void LLDrawable::setNumFaces(const S32 newFaces, LLFacePool *poolp, LLViewerImag | |||
277 | } | 279 | } |
278 | else if (newFaces < (S32)mFaces.size()) | 280 | else if (newFaces < (S32)mFaces.size()) |
279 | { | 281 | { |
282 | LLFace::sDeleteLock = (S32)mFaces.size() - newFaces ; | ||
280 | std::for_each(mFaces.begin() + newFaces, mFaces.end(), DeletePointer()); | 283 | std::for_each(mFaces.begin() + newFaces, mFaces.end(), DeletePointer()); |
281 | mFaces.erase(mFaces.begin() + newFaces, mFaces.end()); | 284 | mFaces.erase(mFaces.begin() + newFaces, mFaces.end()); |
282 | } | 285 | } |
@@ -288,6 +291,8 @@ void LLDrawable::setNumFaces(const S32 newFaces, LLFacePool *poolp, LLViewerImag | |||
288 | addFace(poolp, texturep); | 291 | addFace(poolp, texturep); |
289 | } | 292 | } |
290 | } | 293 | } |
294 | |||
295 | llassert_always(mFaces.size() == newFaces); | ||
291 | } | 296 | } |
292 | 297 | ||
293 | void LLDrawable::setNumFacesFast(const S32 newFaces, LLFacePool *poolp, LLViewerImage *texturep) | 298 | void LLDrawable::setNumFacesFast(const S32 newFaces, LLFacePool *poolp, LLViewerImage *texturep) |
@@ -298,6 +303,7 @@ void LLDrawable::setNumFacesFast(const S32 newFaces, LLFacePool *poolp, LLViewer | |||
298 | } | 303 | } |
299 | else if (newFaces < (S32)mFaces.size()) | 304 | else if (newFaces < (S32)mFaces.size()) |
300 | { | 305 | { |
306 | LLFace::sDeleteLock = (S32)mFaces.size() - newFaces ; | ||
301 | std::for_each(mFaces.begin() + newFaces, mFaces.end(), DeletePointer()); | 307 | std::for_each(mFaces.begin() + newFaces, mFaces.end(), DeletePointer()); |
302 | mFaces.erase(mFaces.begin() + newFaces, mFaces.end()); | 308 | mFaces.erase(mFaces.begin() + newFaces, mFaces.end()); |
303 | } | 309 | } |
@@ -309,6 +315,8 @@ void LLDrawable::setNumFacesFast(const S32 newFaces, LLFacePool *poolp, LLViewer | |||
309 | addFace(poolp, texturep); | 315 | addFace(poolp, texturep); |
310 | } | 316 | } |
311 | } | 317 | } |
318 | |||
319 | llassert_always(mFaces.size() == newFaces) ; | ||
312 | } | 320 | } |
313 | 321 | ||
314 | void LLDrawable::mergeFaces(LLDrawable* src) | 322 | void LLDrawable::mergeFaces(LLDrawable* src) |
@@ -329,8 +337,13 @@ void LLDrawable::deleteFaces(S32 offset, S32 count) | |||
329 | { | 337 | { |
330 | face_list_t::iterator face_begin = mFaces.begin() + offset; | 338 | face_list_t::iterator face_begin = mFaces.begin() + offset; |
331 | face_list_t::iterator face_end = face_begin + count; | 339 | face_list_t::iterator face_end = face_begin + count; |
340 | |||
341 | S32 end = (S32)mFaces.size() ; | ||
342 | LLFace::sDeleteLock = count ; | ||
332 | std::for_each(face_begin, face_end, DeletePointer()); | 343 | std::for_each(face_begin, face_end, DeletePointer()); |
333 | mFaces.erase(face_begin, face_end); | 344 | mFaces.erase(face_begin, face_end); |
345 | |||
346 | llassert_always(mFaces.size() == end - count) ; | ||
334 | } | 347 | } |
335 | 348 | ||
336 | void LLDrawable::update() | 349 | void LLDrawable::update() |