diff options
author | Dave Parks <davep@lindenlab.com> | 2010-02-03 12:33:32 -0600 |
---|---|---|
committer | Dave Parks <davep@lindenlab.com> | 2010-02-03 12:33:32 -0600 |
commit | 8e67ecf3dcd5f168806389a1048b2632582feedb (patch) | |
tree | f63793ae6b972f6205b07769dd7abc9c91690d71 /indra/newview/llglsandbox.cpp | |
parent | 5d7c376332b090801b503d8dc154bb67771230d8 (diff) |
Optimization pass.
-- Further instrumentation of idle update
-- Removed mActiveQ from LLPipeline, instead making calm objects static during LLVOVolume::idleUpdate
-- Further instrumentation of flexible object update
-- Converted LLDynamicArray and LLMap members of LLViewerObjectList to stl counterparts
-- Increased number of update bins in LLViewerObjectList from 16 to 128 (objects will be processed every 128 frames instead of every 16, or ~ 90% fewer objects processed per frame)
-- Removed unused "renderObjectsForSelect" code.
-- Reenabled LOD updates for objects further than 24m from camera
Diffstat (limited to 'indra/newview/llglsandbox.cpp')
-rw-r--r-- | indra/newview/llglsandbox.cpp | 24 |
1 files changed, 14 insertions, 10 deletions
diff --git a/indra/newview/llglsandbox.cpp b/indra/newview/llglsandbox.cpp index 750a9d478f..8569e208eb 100644 --- a/indra/newview/llglsandbox.cpp +++ b/indra/newview/llglsandbox.cpp @@ -897,19 +897,21 @@ void LLViewerObjectList::renderObjectBeacons() S32 last_line_width = -1; // gGL.begin(LLRender::LINES); // Always happens in (line_width != last_line_width) - for (S32 i = 0; i < mDebugBeacons.count(); i++) + BOOL flush = FALSE; + for (std::vector<LLDebugBeacon>::iterator iter = mDebugBeacons.begin(); iter != mDebugBeacons.end(); ++iter) { - const LLDebugBeacon &debug_beacon = mDebugBeacons[i]; + const LLDebugBeacon &debug_beacon = *iter; LLColor4 color = debug_beacon.mColor; color.mV[3] *= 0.25f; S32 line_width = debug_beacon.mLineWidth; if (line_width != last_line_width) { - if (i > 0) + if (flush) { gGL.end(); - gGL.flush(); } + flush = TRUE; + gGL.flush(); glLineWidth( (F32)line_width ); last_line_width = line_width; gGL.begin(LLRender::LINES); @@ -936,18 +938,20 @@ void LLViewerObjectList::renderObjectBeacons() S32 last_line_width = -1; // gGL.begin(LLRender::LINES); // Always happens in (line_width != last_line_width) - for (S32 i = 0; i < mDebugBeacons.count(); i++) + BOOL flush = FALSE; + for (std::vector<LLDebugBeacon>::iterator iter = mDebugBeacons.begin(); iter != mDebugBeacons.end(); ++iter) { - const LLDebugBeacon &debug_beacon = mDebugBeacons[i]; + const LLDebugBeacon &debug_beacon = *iter; S32 line_width = debug_beacon.mLineWidth; if (line_width != last_line_width) { - if (i > 0) + if (flush) { gGL.end(); - gGL.flush(); } + flush = TRUE; + gGL.flush(); glLineWidth( (F32)line_width ); last_line_width = line_width; gGL.begin(LLRender::LINES); @@ -969,9 +973,9 @@ void LLViewerObjectList::renderObjectBeacons() gGL.flush(); glLineWidth(1.f); - for (S32 i = 0; i < mDebugBeacons.count(); i++) + for (std::vector<LLDebugBeacon>::iterator iter = mDebugBeacons.begin(); iter != mDebugBeacons.end(); ++iter) { - LLDebugBeacon &debug_beacon = mDebugBeacons[i]; + LLDebugBeacon &debug_beacon = *iter; if (debug_beacon.mString == "") { continue; |