diff options
Diffstat (limited to 'linden/indra/newview/llglsandbox.cpp')
-rw-r--r-- | linden/indra/newview/llglsandbox.cpp | 35 |
1 files changed, 21 insertions, 14 deletions
diff --git a/linden/indra/newview/llglsandbox.cpp b/linden/indra/newview/llglsandbox.cpp index 28b92fd..f63eaf3 100644 --- a/linden/indra/newview/llglsandbox.cpp +++ b/linden/indra/newview/llglsandbox.cpp | |||
@@ -1006,17 +1006,17 @@ void LLViewerObjectList::renderObjectBeacons() | |||
1006 | return; | 1006 | return; |
1007 | } | 1007 | } |
1008 | 1008 | ||
1009 | S32 i; | ||
1010 | //const LLFontGL *font = LLResMgr::getInstance()->getRes(LLFONT_SANSSERIF); | 1009 | //const LLFontGL *font = LLResMgr::getInstance()->getRes(LLFONT_SANSSERIF); |
1011 | 1010 | ||
1012 | LLGLSUIDefault gls_ui; | 1011 | LLGLSUIDefault gls_ui; |
1013 | 1012 | ||
1014 | S32 last_line_width = -1; | ||
1015 | |||
1016 | { | 1013 | { |
1017 | LLGLSNoTexture gls_ui_no_texture; | 1014 | LLGLSNoTexture gls_ui_no_texture; |
1018 | gGL.begin(GL_LINES); | 1015 | |
1019 | for (i = 0; i < mDebugBeacons.count(); i++) | 1016 | S32 last_line_width = -1; |
1017 | // gGL.begin(GL_LINES); // Always happens in (line_width != last_line_width) | ||
1018 | |||
1019 | for (S32 i = 0; i < mDebugBeacons.count(); i++) | ||
1020 | { | 1020 | { |
1021 | const LLDebugBeacon &debug_beacon = mDebugBeacons[i]; | 1021 | const LLDebugBeacon &debug_beacon = mDebugBeacons[i]; |
1022 | LLColor4 color = debug_beacon.mColor; | 1022 | LLColor4 color = debug_beacon.mColor; |
@@ -1024,8 +1024,11 @@ void LLViewerObjectList::renderObjectBeacons() | |||
1024 | S32 line_width = debug_beacon.mLineWidth; | 1024 | S32 line_width = debug_beacon.mLineWidth; |
1025 | if (line_width != last_line_width) | 1025 | if (line_width != last_line_width) |
1026 | { | 1026 | { |
1027 | gGL.end(); | 1027 | if (i > 0) |
1028 | gGL.flush(); | 1028 | { |
1029 | gGL.end(); | ||
1030 | gGL.flush(); | ||
1031 | } | ||
1029 | glLineWidth( (F32)line_width ); | 1032 | glLineWidth( (F32)line_width ); |
1030 | last_line_width = line_width; | 1033 | last_line_width = line_width; |
1031 | gGL.begin(GL_LINES); | 1034 | gGL.begin(GL_LINES); |
@@ -1049,17 +1052,21 @@ void LLViewerObjectList::renderObjectBeacons() | |||
1049 | LLGLSNoTexture gls_ui_no_texture; | 1052 | LLGLSNoTexture gls_ui_no_texture; |
1050 | LLGLDepthTest gls_depth(GL_TRUE); | 1053 | LLGLDepthTest gls_depth(GL_TRUE); |
1051 | 1054 | ||
1052 | gGL.begin(GL_LINES); | 1055 | S32 last_line_width = -1; |
1053 | last_line_width = -1; | 1056 | // gGL.begin(GL_LINES); // Always happens in (line_width != last_line_width) |
1054 | for (i = 0; i < mDebugBeacons.count(); i++) | 1057 | |
1058 | for (S32 i = 0; i < mDebugBeacons.count(); i++) | ||
1055 | { | 1059 | { |
1056 | const LLDebugBeacon &debug_beacon = mDebugBeacons[i]; | 1060 | const LLDebugBeacon &debug_beacon = mDebugBeacons[i]; |
1057 | 1061 | ||
1058 | S32 line_width = debug_beacon.mLineWidth; | 1062 | S32 line_width = debug_beacon.mLineWidth; |
1059 | if (line_width != last_line_width) | 1063 | if (line_width != last_line_width) |
1060 | { | 1064 | { |
1061 | gGL.end(); | 1065 | if (i > 0) |
1062 | gGL.flush(); | 1066 | { |
1067 | gGL.end(); | ||
1068 | gGL.flush(); | ||
1069 | } | ||
1063 | glLineWidth( (F32)line_width ); | 1070 | glLineWidth( (F32)line_width ); |
1064 | last_line_width = line_width; | 1071 | last_line_width = line_width; |
1065 | gGL.begin(GL_LINES); | 1072 | gGL.begin(GL_LINES); |
@@ -1076,12 +1083,12 @@ void LLViewerObjectList::renderObjectBeacons() | |||
1076 | 1083 | ||
1077 | draw_line_cube(0.10f, thisline); | 1084 | draw_line_cube(0.10f, thisline); |
1078 | } | 1085 | } |
1086 | |||
1079 | gGL.end(); | 1087 | gGL.end(); |
1080 | |||
1081 | gGL.flush(); | 1088 | gGL.flush(); |
1082 | glLineWidth(1.f); | 1089 | glLineWidth(1.f); |
1083 | 1090 | ||
1084 | for (i = 0; i < mDebugBeacons.count(); i++) | 1091 | for (S32 i = 0; i < mDebugBeacons.count(); i++) |
1085 | { | 1092 | { |
1086 | LLDebugBeacon &debug_beacon = mDebugBeacons[i]; | 1093 | LLDebugBeacon &debug_beacon = mDebugBeacons[i]; |
1087 | if (debug_beacon.mString == "") | 1094 | if (debug_beacon.mString == "") |