summaryrefslogtreecommitdiff
path: root/indra/newview/llglsandbox.cpp
diff options
context:
space:
mode:
authorBrad Payne (Vir Linden) <vir@lindenlab.com>2010-02-26 13:13:26 -0500
committerBrad Payne (Vir Linden) <vir@lindenlab.com>2010-02-26 13:13:26 -0500
commit3b52ab6cf17ceae4a2d45a8477b8643a9e3c6162 (patch)
tree58491dbe94278921244e05927d0d58b580304646 /indra/newview/llglsandbox.cpp
parent27c83bf399f2ca91f0444aa97a98af00a2483c30 (diff)
parent470c05b70808f0a51090c0f50847fe614bf041e9 (diff)
merge
Diffstat (limited to 'indra/newview/llglsandbox.cpp')
-rw-r--r--indra/newview/llglsandbox.cpp24
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;