diff options
Diffstat (limited to 'linden/indra/llui/llui.cpp')
-rw-r--r-- | linden/indra/llui/llui.cpp | 56 |
1 files changed, 28 insertions, 28 deletions
diff --git a/linden/indra/llui/llui.cpp b/linden/indra/llui/llui.cpp index aafd3af..45b1175 100644 --- a/linden/indra/llui/llui.cpp +++ b/linden/indra/llui/llui.cpp | |||
@@ -152,7 +152,7 @@ void gl_draw_x(const LLRect& rect, const LLColor4& color) | |||
152 | 152 | ||
153 | gGL.color4fv( color.mV ); | 153 | gGL.color4fv( color.mV ); |
154 | 154 | ||
155 | gGL.begin( GL_LINES ); | 155 | gGL.begin( LLVertexBuffer::LINES ); |
156 | gGL.vertex2i( rect.mLeft, rect.mTop ); | 156 | gGL.vertex2i( rect.mLeft, rect.mTop ); |
157 | gGL.vertex2i( rect.mRight, rect.mBottom ); | 157 | gGL.vertex2i( rect.mRight, rect.mBottom ); |
158 | gGL.vertex2i( rect.mLeft, rect.mBottom ); | 158 | gGL.vertex2i( rect.mLeft, rect.mBottom ); |
@@ -193,7 +193,7 @@ void gl_rect_2d(S32 left, S32 top, S32 right, S32 bottom, BOOL filled ) | |||
193 | // Counterclockwise quad will face the viewer | 193 | // Counterclockwise quad will face the viewer |
194 | if( filled ) | 194 | if( filled ) |
195 | { | 195 | { |
196 | gGL.begin( GL_QUADS ); | 196 | gGL.begin( LLVertexBuffer::QUADS ); |
197 | gGL.vertex2i(left, top); | 197 | gGL.vertex2i(left, top); |
198 | gGL.vertex2i(left, bottom); | 198 | gGL.vertex2i(left, bottom); |
199 | gGL.vertex2i(right, bottom); | 199 | gGL.vertex2i(right, bottom); |
@@ -205,7 +205,7 @@ void gl_rect_2d(S32 left, S32 top, S32 right, S32 bottom, BOOL filled ) | |||
205 | if( gGLManager.mATIOffsetVerticalLines ) | 205 | if( gGLManager.mATIOffsetVerticalLines ) |
206 | { | 206 | { |
207 | // Work around bug in ATI driver: vertical lines are offset by (-1,-1) | 207 | // Work around bug in ATI driver: vertical lines are offset by (-1,-1) |
208 | gGL.begin( GL_LINES ); | 208 | gGL.begin( LLVertexBuffer::LINES ); |
209 | 209 | ||
210 | // Verticals | 210 | // Verticals |
211 | gGL.vertex2i(left + 1, top); | 211 | gGL.vertex2i(left + 1, top); |
@@ -228,7 +228,7 @@ void gl_rect_2d(S32 left, S32 top, S32 right, S32 bottom, BOOL filled ) | |||
228 | { | 228 | { |
229 | top--; | 229 | top--; |
230 | right--; | 230 | right--; |
231 | gGL.begin( GL_LINE_STRIP ); | 231 | gGL.begin( LLVertexBuffer::LINE_STRIP ); |
232 | gGL.vertex2i(left, top); | 232 | gGL.vertex2i(left, top); |
233 | gGL.vertex2i(left, bottom); | 233 | gGL.vertex2i(left, bottom); |
234 | gGL.vertex2i(right, bottom); | 234 | gGL.vertex2i(right, bottom); |
@@ -269,7 +269,7 @@ void gl_drop_shadow(S32 left, S32 top, S32 right, S32 bottom, const LLColor4 &st | |||
269 | LLColor4 end_color = start_color; | 269 | LLColor4 end_color = start_color; |
270 | end_color.mV[VALPHA] = 0.f; | 270 | end_color.mV[VALPHA] = 0.f; |
271 | 271 | ||
272 | gGL.begin(GL_QUADS); | 272 | gGL.begin(LLVertexBuffer::QUADS); |
273 | 273 | ||
274 | // Right edge, CCW faces screen | 274 | // Right edge, CCW faces screen |
275 | gGL.color4fv(start_color.mV); | 275 | gGL.color4fv(start_color.mV); |
@@ -331,7 +331,7 @@ void gl_line_2d(S32 x1, S32 y1, S32 x2, S32 y2 ) | |||
331 | 331 | ||
332 | LLGLSNoTexture no_texture; | 332 | LLGLSNoTexture no_texture; |
333 | 333 | ||
334 | gGL.begin(GL_LINES); | 334 | gGL.begin(LLVertexBuffer::LINES); |
335 | gGL.vertex2i(x1, y1); | 335 | gGL.vertex2i(x1, y1); |
336 | gGL.vertex2i(x2, y2); | 336 | gGL.vertex2i(x2, y2); |
337 | gGL.end(); | 337 | gGL.end(); |
@@ -352,7 +352,7 @@ void gl_line_2d(S32 x1, S32 y1, S32 x2, S32 y2, const LLColor4 &color ) | |||
352 | 352 | ||
353 | gGL.color4fv( color.mV ); | 353 | gGL.color4fv( color.mV ); |
354 | 354 | ||
355 | gGL.begin(GL_LINES); | 355 | gGL.begin(LLVertexBuffer::LINES); |
356 | gGL.vertex2i(x1, y1); | 356 | gGL.vertex2i(x1, y1); |
357 | gGL.vertex2i(x2, y2); | 357 | gGL.vertex2i(x2, y2); |
358 | gGL.end(); | 358 | gGL.end(); |
@@ -366,11 +366,11 @@ void gl_triangle_2d(S32 x1, S32 y1, S32 x2, S32 y2, S32 x3, S32 y3, const LLColo | |||
366 | 366 | ||
367 | if (filled) | 367 | if (filled) |
368 | { | 368 | { |
369 | gGL.begin(GL_TRIANGLES); | 369 | gGL.begin(LLVertexBuffer::TRIANGLES); |
370 | } | 370 | } |
371 | else | 371 | else |
372 | { | 372 | { |
373 | gGL.begin(GL_LINE_LOOP); | 373 | gGL.begin(LLVertexBuffer::LINE_LOOP); |
374 | } | 374 | } |
375 | gGL.vertex2i(x1, y1); | 375 | gGL.vertex2i(x1, y1); |
376 | gGL.vertex2i(x2, y2); | 376 | gGL.vertex2i(x2, y2); |
@@ -384,7 +384,7 @@ void gl_corners_2d(S32 left, S32 top, S32 right, S32 bottom, S32 length, F32 max | |||
384 | 384 | ||
385 | length = llmin((S32)(max_frac*(right - left)), length); | 385 | length = llmin((S32)(max_frac*(right - left)), length); |
386 | length = llmin((S32)(max_frac*(top - bottom)), length); | 386 | length = llmin((S32)(max_frac*(top - bottom)), length); |
387 | gGL.begin(GL_LINES); | 387 | gGL.begin(LLVertexBuffer::LINES); |
388 | gGL.vertex2i(left, top); | 388 | gGL.vertex2i(left, top); |
389 | gGL.vertex2i(left + length, top); | 389 | gGL.vertex2i(left + length, top); |
390 | 390 | ||
@@ -515,7 +515,7 @@ void gl_draw_scaled_image_with_border(S32 x, S32 y, S32 width, S32 height, LLIma | |||
515 | 515 | ||
516 | gGL.color4fv(color.mV); | 516 | gGL.color4fv(color.mV); |
517 | 517 | ||
518 | gGL.begin(GL_QUADS); | 518 | gGL.begin(LLVertexBuffer::QUADS); |
519 | { | 519 | { |
520 | // draw bottom left | 520 | // draw bottom left |
521 | gGL.texCoord2f(uv_rect.mLeft, uv_rect.mBottom); | 521 | gGL.texCoord2f(uv_rect.mLeft, uv_rect.mBottom); |
@@ -675,7 +675,7 @@ void gl_draw_scaled_rotated_image(S32 x, S32 y, S32 width, S32 height, F32 degre | |||
675 | 675 | ||
676 | gGL.color4fv(color.mV); | 676 | gGL.color4fv(color.mV); |
677 | 677 | ||
678 | gGL.begin(GL_QUADS); | 678 | gGL.begin(LLVertexBuffer::QUADS); |
679 | { | 679 | { |
680 | gGL.texCoord2f(uv_rect.mRight, uv_rect.mTop); | 680 | gGL.texCoord2f(uv_rect.mRight, uv_rect.mTop); |
681 | gGL.vertex2i(width, height ); | 681 | gGL.vertex2i(width, height ); |
@@ -713,7 +713,7 @@ void gl_draw_scaled_image_inverted(S32 x, S32 y, S32 width, S32 height, LLImageG | |||
713 | 713 | ||
714 | gGL.color4fv(color.mV); | 714 | gGL.color4fv(color.mV); |
715 | 715 | ||
716 | gGL.begin(GL_QUADS); | 716 | gGL.begin(LLVertexBuffer::QUADS); |
717 | { | 717 | { |
718 | gGL.texCoord2f(uv_rect.mRight, uv_rect.mBottom); | 718 | gGL.texCoord2f(uv_rect.mRight, uv_rect.mBottom); |
719 | gGL.vertex2i(width, height ); | 719 | gGL.vertex2i(width, height ); |
@@ -748,7 +748,7 @@ void gl_stippled_line_3d( const LLVector3& start, const LLVector3& end, const LL | |||
748 | glLineWidth(2.5f); | 748 | glLineWidth(2.5f); |
749 | glLineStipple(2, 0x3333 << shift); | 749 | glLineStipple(2, 0x3333 << shift); |
750 | 750 | ||
751 | gGL.begin(GL_LINES); | 751 | gGL.begin(LLVertexBuffer::LINES); |
752 | { | 752 | { |
753 | gGL.vertex3fv( start.mV ); | 753 | gGL.vertex3fv( start.mV ); |
754 | gGL.vertex3fv( end.mV ); | 754 | gGL.vertex3fv( end.mV ); |
@@ -765,7 +765,7 @@ void gl_rect_2d_xor(S32 left, S32 top, S32 right, S32 bottom) | |||
765 | glLogicOp( GL_XOR ); | 765 | glLogicOp( GL_XOR ); |
766 | stop_glerror(); | 766 | stop_glerror(); |
767 | 767 | ||
768 | gGL.begin(GL_QUADS); | 768 | gGL.begin(LLVertexBuffer::QUADS); |
769 | gGL.vertex2i(left, top); | 769 | gGL.vertex2i(left, top); |
770 | gGL.vertex2i(left, bottom); | 770 | gGL.vertex2i(left, bottom); |
771 | gGL.vertex2i(right, bottom); | 771 | gGL.vertex2i(right, bottom); |
@@ -797,14 +797,14 @@ void gl_arc_2d(F32 center_x, F32 center_y, F32 radius, S32 steps, BOOL filled, F | |||
797 | 797 | ||
798 | if (filled) | 798 | if (filled) |
799 | { | 799 | { |
800 | gGL.begin(GL_TRIANGLE_FAN); | 800 | gGL.begin(LLVertexBuffer::TRIANGLE_FAN); |
801 | gGL.vertex2f(0.f, 0.f); | 801 | gGL.vertex2f(0.f, 0.f); |
802 | // make sure circle is complete | 802 | // make sure circle is complete |
803 | steps += 1; | 803 | steps += 1; |
804 | } | 804 | } |
805 | else | 805 | else |
806 | { | 806 | { |
807 | gGL.begin(GL_LINE_STRIP); | 807 | gGL.begin(LLVertexBuffer::LINE_STRIP); |
808 | } | 808 | } |
809 | 809 | ||
810 | while( steps-- ) | 810 | while( steps-- ) |
@@ -836,14 +836,14 @@ void gl_circle_2d(F32 center_x, F32 center_y, F32 radius, S32 steps, BOOL filled | |||
836 | 836 | ||
837 | if (filled) | 837 | if (filled) |
838 | { | 838 | { |
839 | gGL.begin(GL_TRIANGLE_FAN); | 839 | gGL.begin(LLVertexBuffer::TRIANGLE_FAN); |
840 | gGL.vertex2f(0.f, 0.f); | 840 | gGL.vertex2f(0.f, 0.f); |
841 | // make sure circle is complete | 841 | // make sure circle is complete |
842 | steps += 1; | 842 | steps += 1; |
843 | } | 843 | } |
844 | else | 844 | else |
845 | { | 845 | { |
846 | gGL.begin(GL_LINE_LOOP); | 846 | gGL.begin(LLVertexBuffer::LINE_LOOP); |
847 | } | 847 | } |
848 | 848 | ||
849 | while( steps-- ) | 849 | while( steps-- ) |
@@ -865,7 +865,7 @@ void gl_deep_circle( F32 radius, F32 depth, S32 steps ) | |||
865 | F32 x = radius; | 865 | F32 x = radius; |
866 | F32 y = 0.f; | 866 | F32 y = 0.f; |
867 | F32 angle_delta = F_TWO_PI / (F32)steps; | 867 | F32 angle_delta = F_TWO_PI / (F32)steps; |
868 | gGL.begin( GL_TRIANGLE_STRIP ); | 868 | gGL.begin( LLVertexBuffer::TRIANGLE_STRIP ); |
869 | { | 869 | { |
870 | S32 step = steps + 1; // An extra step to close the circle. | 870 | S32 step = steps + 1; // An extra step to close the circle. |
871 | while( step-- ) | 871 | while( step-- ) |
@@ -952,7 +952,7 @@ void gl_washer_2d(F32 outer_radius, F32 inner_radius, S32 steps, const LLColor4& | |||
952 | 952 | ||
953 | LLGLSNoTexture gls_no_texture; | 953 | LLGLSNoTexture gls_no_texture; |
954 | 954 | ||
955 | gGL.begin( GL_TRIANGLE_STRIP ); | 955 | gGL.begin( LLVertexBuffer::TRIANGLE_STRIP ); |
956 | { | 956 | { |
957 | steps += 1; // An extra step to close the circle. | 957 | steps += 1; // An extra step to close the circle. |
958 | while( steps-- ) | 958 | while( steps-- ) |
@@ -988,7 +988,7 @@ void gl_washer_segment_2d(F32 outer_radius, F32 inner_radius, F32 start_radians, | |||
988 | F32 y2 = inner_radius * sin( start_radians ); | 988 | F32 y2 = inner_radius * sin( start_radians ); |
989 | 989 | ||
990 | LLGLSNoTexture gls_no_texture; | 990 | LLGLSNoTexture gls_no_texture; |
991 | gGL.begin( GL_TRIANGLE_STRIP ); | 991 | gGL.begin( LLVertexBuffer::TRIANGLE_STRIP ); |
992 | { | 992 | { |
993 | steps += 1; // An extra step to close the circle. | 993 | steps += 1; // An extra step to close the circle. |
994 | while( steps-- ) | 994 | while( steps-- ) |
@@ -1025,7 +1025,7 @@ void gl_washer_spokes_2d(F32 outer_radius, F32 inner_radius, S32 count, const LL | |||
1025 | 1025 | ||
1026 | LLGLSNoTexture gls_no_texture; | 1026 | LLGLSNoTexture gls_no_texture; |
1027 | 1027 | ||
1028 | gGL.begin( GL_LINES ); | 1028 | gGL.begin( LLVertexBuffer::LINES ); |
1029 | { | 1029 | { |
1030 | while( count-- ) | 1030 | while( count-- ) |
1031 | { | 1031 | { |
@@ -1048,7 +1048,7 @@ void gl_washer_spokes_2d(F32 outer_radius, F32 inner_radius, S32 count, const LL | |||
1048 | 1048 | ||
1049 | void gl_rect_2d_simple_tex( S32 width, S32 height ) | 1049 | void gl_rect_2d_simple_tex( S32 width, S32 height ) |
1050 | { | 1050 | { |
1051 | gGL.begin( GL_QUADS ); | 1051 | gGL.begin( LLVertexBuffer::QUADS ); |
1052 | 1052 | ||
1053 | gGL.texCoord2f(1.f, 1.f); | 1053 | gGL.texCoord2f(1.f, 1.f); |
1054 | gGL.vertex2i(width, height); | 1054 | gGL.vertex2i(width, height); |
@@ -1067,7 +1067,7 @@ void gl_rect_2d_simple_tex( S32 width, S32 height ) | |||
1067 | 1067 | ||
1068 | void gl_rect_2d_simple( S32 width, S32 height ) | 1068 | void gl_rect_2d_simple( S32 width, S32 height ) |
1069 | { | 1069 | { |
1070 | gGL.begin( GL_QUADS ); | 1070 | gGL.begin( LLVertexBuffer::QUADS ); |
1071 | gGL.vertex2i(width, height); | 1071 | gGL.vertex2i(width, height); |
1072 | gGL.vertex2i(0, height); | 1072 | gGL.vertex2i(0, height); |
1073 | gGL.vertex2i(0, 0); | 1073 | gGL.vertex2i(0, 0); |
@@ -1109,7 +1109,7 @@ void gl_segmented_rect_2d_tex(const S32 left, | |||
1109 | LLVector2 width_vec((F32)width, 0.f); | 1109 | LLVector2 width_vec((F32)width, 0.f); |
1110 | LLVector2 height_vec(0.f, (F32)height); | 1110 | LLVector2 height_vec(0.f, (F32)height); |
1111 | 1111 | ||
1112 | gGL.begin(GL_QUADS); | 1112 | gGL.begin(LLVertexBuffer::QUADS); |
1113 | { | 1113 | { |
1114 | // draw bottom left | 1114 | // draw bottom left |
1115 | gGL.texCoord2f(0.f, 0.f); | 1115 | gGL.texCoord2f(0.f, 0.f); |
@@ -1277,7 +1277,7 @@ void gl_segmented_rect_2d_fragment_tex(const S32 left, | |||
1277 | LLVector2 x_min; | 1277 | LLVector2 x_min; |
1278 | LLVector2 x_max; | 1278 | LLVector2 x_max; |
1279 | 1279 | ||
1280 | gGL.begin(GL_QUADS); | 1280 | gGL.begin(LLVertexBuffer::QUADS); |
1281 | { | 1281 | { |
1282 | if (start_fragment < middle_start) | 1282 | if (start_fragment < middle_start) |
1283 | { | 1283 | { |
@@ -1434,7 +1434,7 @@ void gl_segmented_rect_3d_tex(const LLVector2& border_scale, const LLVector3& bo | |||
1434 | LLVector3 bottom_border_height = ((edges & (~(U32)ROUNDED_RECT_TOP)) != 0) ? border_height : LLVector3::zero; | 1434 | LLVector3 bottom_border_height = ((edges & (~(U32)ROUNDED_RECT_TOP)) != 0) ? border_height : LLVector3::zero; |
1435 | 1435 | ||
1436 | 1436 | ||
1437 | gGL.begin(GL_QUADS); | 1437 | gGL.begin(LLVertexBuffer::QUADS); |
1438 | { | 1438 | { |
1439 | // draw bottom left | 1439 | // draw bottom left |
1440 | gGL.texCoord2f(0.f, 0.f); | 1440 | gGL.texCoord2f(0.f, 0.f); |