summaryrefslogtreecommitdiff
path: root/indra/newview/llglsandbox.cpp
diff options
context:
space:
mode:
authorPalmer Truelson <palmer@lindenlab.com>2010-02-12 21:06:02 -0800
committerPalmer Truelson <palmer@lindenlab.com>2010-02-12 21:06:02 -0800
commit1f672990e796ec55f7b684dbf46f939d1ab15607 (patch)
tree24435fc8f74b331277afe9cafc60d7e7dcfccabf /indra/newview/llglsandbox.cpp
parent8e67ecf3dcd5f168806389a1048b2632582feedb (diff)
Backed out davep's optimization pass. changeset 3c3685de430a
Diffstat (limited to 'indra/newview/llglsandbox.cpp')
-rw-r--r--indra/newview/llglsandbox.cpp24
1 files changed, 10 insertions, 14 deletions
diff --git a/indra/newview/llglsandbox.cpp b/indra/newview/llglsandbox.cpp
index 8569e208eb..750a9d478f 100644
--- a/indra/newview/llglsandbox.cpp
+++ b/indra/newview/llglsandbox.cpp
@@ -897,21 +897,19 @@ void LLViewerObjectList::renderObjectBeacons()
S32 last_line_width = -1;
// gGL.begin(LLRender::LINES); // Always happens in (line_width != last_line_width)
- BOOL flush = FALSE;
- for (std::vector<LLDebugBeacon>::iterator iter = mDebugBeacons.begin(); iter != mDebugBeacons.end(); ++iter)
+ for (S32 i = 0; i < mDebugBeacons.count(); i++)
{
- const LLDebugBeacon &debug_beacon = *iter;
+ const LLDebugBeacon &debug_beacon = mDebugBeacons[i];
LLColor4 color = debug_beacon.mColor;
color.mV[3] *= 0.25f;
S32 line_width = debug_beacon.mLineWidth;
if (line_width != last_line_width)
{
- if (flush)
+ if (i > 0)
{
gGL.end();
+ gGL.flush();
}
- flush = TRUE;
- gGL.flush();
glLineWidth( (F32)line_width );
last_line_width = line_width;
gGL.begin(LLRender::LINES);
@@ -938,20 +936,18 @@ void LLViewerObjectList::renderObjectBeacons()
S32 last_line_width = -1;
// gGL.begin(LLRender::LINES); // Always happens in (line_width != last_line_width)
- BOOL flush = FALSE;
- for (std::vector<LLDebugBeacon>::iterator iter = mDebugBeacons.begin(); iter != mDebugBeacons.end(); ++iter)
+ for (S32 i = 0; i < mDebugBeacons.count(); i++)
{
- const LLDebugBeacon &debug_beacon = *iter;
+ const LLDebugBeacon &debug_beacon = mDebugBeacons[i];
S32 line_width = debug_beacon.mLineWidth;
if (line_width != last_line_width)
{
- if (flush)
+ if (i > 0)
{
gGL.end();
+ gGL.flush();
}
- flush = TRUE;
- gGL.flush();
glLineWidth( (F32)line_width );
last_line_width = line_width;
gGL.begin(LLRender::LINES);
@@ -973,9 +969,9 @@ void LLViewerObjectList::renderObjectBeacons()
gGL.flush();
glLineWidth(1.f);
- for (std::vector<LLDebugBeacon>::iterator iter = mDebugBeacons.begin(); iter != mDebugBeacons.end(); ++iter)
+ for (S32 i = 0; i < mDebugBeacons.count(); i++)
{
- LLDebugBeacon &debug_beacon = *iter;
+ LLDebugBeacon &debug_beacon = mDebugBeacons[i];
if (debug_beacon.mString == "")
{
continue;