From 983a7e31dc094987232df46b4500ed3f8437970b Mon Sep 17 00:00:00 2001 From: Shyotl Date: Fri, 17 Feb 2017 23:15:45 -0600 Subject: [PATCH] Have gl_rect_2d and gl_rect_2d_simple use TRIANGLES instead of TRIANGLE_STRIP --- indra/llrender/llrender2dutils.cpp | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/indra/llrender/llrender2dutils.cpp b/indra/llrender/llrender2dutils.cpp index a2ee6434b..272b5af24 100644 --- a/indra/llrender/llrender2dutils.cpp +++ b/indra/llrender/llrender2dutils.cpp @@ -123,10 +123,12 @@ void gl_rect_2d(S32 left, S32 top, S32 right, S32 bottom, BOOL filled ) // Counterclockwise quad will face the viewer if( filled ) { - gGL.begin( LLRender::TRIANGLE_STRIP ); + gGL.begin( LLRender::TRIANGLES ); gGL.vertex2i(left, top); gGL.vertex2i(left, bottom); gGL.vertex2i(right, top); + gGL.vertex2i(right, top); + gGL.vertex2i(left, bottom); gGL.vertex2i(right, bottom); gGL.end(); } @@ -1058,22 +1060,24 @@ void gl_rect_2d_simple_tex( S32 width, S32 height ) void gl_rect_2d_simple( S32 width, S32 height ) { - gGL.begin( LLRender::TRIANGLE_STRIP); + gGL.begin( LLRender::TRIANGLES); gGL.vertex2i(0, 0); gGL.vertex2i(0, height); gGL.vertex2i(width, 0); + gGL.vertex2i(width, 0); + gGL.vertex2i(0, height); gGL.vertex2i(width, height); gGL.end(); } -void gl_segmented_rect_2d_tex(const S32 left, - const S32 top, - const S32 right, - const S32 bottom, - const S32 texture_width, - const S32 texture_height, - const S32 border_size, - const U32 edges) +void gl_segmented_rect_2d_tex(const S32 left, + const S32 top, + const S32 right, + const S32 bottom, + const S32 texture_width, + const S32 texture_height, + const S32 border_size, + const U32 edges) { S32 width = llabs(right - left); S32 height = llabs(top - bottom);