From 8e67ecf3dcd5f168806389a1048b2632582feedb Mon Sep 17 00:00:00 2001 From: Dave Parks Date: Wed, 3 Feb 2010 12:33:32 -0600 Subject: 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 --- indra/newview/llglsandbox.cpp | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) (limited to 'indra/newview/llglsandbox.cpp') 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::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::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::iterator iter = mDebugBeacons.begin(); iter != mDebugBeacons.end(); ++iter) { - LLDebugBeacon &debug_beacon = mDebugBeacons[i]; + LLDebugBeacon &debug_beacon = *iter; if (debug_beacon.mString == "") { continue; -- cgit v1.2.3