summaryrefslogtreecommitdiff
path: root/indra/newview/llhudrender.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llhudrender.cpp')
-rw-r--r--indra/newview/llhudrender.cpp13
1 files changed, 11 insertions, 2 deletions
diff --git a/indra/newview/llhudrender.cpp b/indra/newview/llhudrender.cpp
index 5608ab763f..f027aa5552 100644
--- a/indra/newview/llhudrender.cpp
+++ b/indra/newview/llhudrender.cpp
@@ -39,6 +39,7 @@
#include "llui.h"
void hud_render_utf8text(const std::string &str, const LLVector3 &pos_agent,
+ LLFontVertexBuffer *font_buffer,
const LLFontGL &font,
const U8 style,
const LLFontGL::ShadowType shadow,
@@ -47,10 +48,11 @@ void hud_render_utf8text(const std::string &str, const LLVector3 &pos_agent,
const bool orthographic)
{
LLWString wstr(utf8str_to_wstring(str));
- hud_render_text(wstr, pos_agent, font, style, shadow, x_offset, y_offset, color, orthographic);
+ hud_render_text(wstr, pos_agent, font_buffer, font, style, shadow, x_offset, y_offset, color, orthographic);
}
void hud_render_text(const LLWString &wstr, const LLVector3 &pos_agent,
+ LLFontVertexBuffer *font_buffer,
const LLFontGL &font,
const U8 style,
const LLFontGL::ShadowType shadow,
@@ -138,7 +140,14 @@ void hud_render_text(const LLWString &wstr, const LLVector3 &pos_agent,
LLUI::translate((F32) winX*1.0f/LLFontGL::sScaleX, (F32) winY*1.0f/(LLFontGL::sScaleY), -(((F32) winZ*2.f)-1.f));
F32 right_x;
- font.render(wstr, 0, 0, 1, color, LLFontGL::LEFT, LLFontGL::BASELINE, style, shadow, static_cast<S32>(wstr.length()), 1000, &right_x, /*use_ellipses*/false, /*use_color*/true);
+ if (font_buffer)
+ {
+ font_buffer->render(&font, wstr, 0, 0, 1, color, LLFontGL::LEFT, LLFontGL::BASELINE, style, shadow, static_cast<S32>(wstr.length()), 1000, &right_x, /*use_ellipses*/false, /*use_color*/true);
+ }
+ else
+ {
+ font.render(wstr, 0, 0, 1, color, LLFontGL::LEFT, LLFontGL::BASELINE, style, shadow, static_cast<S32>(wstr.length()), 1000, &right_x, /*use_ellipses*/false, /*use_color*/true);
+ }
LLUI::popMatrix();
gGL.popMatrix();