summaryrefslogtreecommitdiff
path: root/indra/llui/llbadge.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/llui/llbadge.cpp')
-rw-r--r--indra/llui/llbadge.cpp40
1 files changed, 20 insertions, 20 deletions
diff --git a/indra/llui/llbadge.cpp b/indra/llui/llbadge.cpp
index de06d56ae0..42b6f1f07b 100644
--- a/indra/llui/llbadge.cpp
+++ b/indra/llui/llbadge.cpp
@@ -27,6 +27,8 @@
#define LLBADGE_CPP
#include "llbadge.h"
+#include "llfontgl.h"
+#include "llfontvertexbuffer.h"
#include "llscrollcontainer.h"
#include "lluictrlfactory.h"
@@ -202,17 +204,15 @@ void renderBadgeBackground(F32 centerX, F32 centerY, F32 width, F32 height, cons
(F32)ll_round(x) + width,
(F32)ll_round(y) + height);
- LLVector4a vertices[6];
- vertices[0].set(screen_rect.mLeft, screen_rect.mTop, 1.0f);
- vertices[1].set(screen_rect.mLeft, screen_rect.mBottom, 1.0f);
- vertices[2].set(screen_rect.mRight, screen_rect.mTop, 1.0f);
- vertices[3].set(screen_rect.mRight, screen_rect.mTop, 1.0f);
- vertices[4].set(screen_rect.mLeft, screen_rect.mBottom, 1.0f);
- vertices[5].set(screen_rect.mRight, screen_rect.mBottom, 1.0f);
+ LLVector4a vertices[4];
+ vertices[0].set(screen_rect.mLeft, screen_rect.mTop, 1.0f);
+ vertices[1].set(screen_rect.mRight, screen_rect.mTop, 1.0f);
+ vertices[2].set(screen_rect.mLeft, screen_rect.mBottom, 1.0f);
+ vertices[3].set(screen_rect.mRight, screen_rect.mBottom, 1.0f);
- gGL.begin(LLRender::TRIANGLES);
+ gGL.begin(LLRender::TRIANGLE_STRIP);
{
- gGL.vertexBatchPreTransformed(vertices, 6);
+ gGL.vertexBatchPreTransformed(vertices, 4);
}
gGL.end();
@@ -353,17 +353,17 @@ void LLBadge::draw()
//
// Draw the label
//
-
- mGLFont->render(mLabel.getWString(),
- badge_label_begin_offset,
- badge_center_x + mLabelOffsetHoriz,
- badge_center_y + mLabelOffsetVert,
- mLabelColor % alpha,
- LLFontGL::HCENTER, LLFontGL::VCENTER, // centered around the position
- LLFontGL::NORMAL, // normal text (not bold, italics, etc.)
- LLFontGL::DROP_SHADOW_SOFT,
- badge_char_length, badge_pixel_length,
- right_position_out, do_not_use_ellipses);
+ mFontBuffer.render(mGLFont,
+ mLabel.getWString(),
+ badge_label_begin_offset,
+ badge_center_x + mLabelOffsetHoriz,
+ badge_center_y + mLabelOffsetVert,
+ mLabelColor % alpha,
+ LLFontGL::HCENTER, LLFontGL::VCENTER, // centered around the position
+ LLFontGL::NORMAL, // normal text (not bold, italics, etc.)
+ LLFontGL::DROP_SHADOW_SOFT,
+ badge_char_length, badge_pixel_length,
+ right_position_out, do_not_use_ellipses);
}
}
}