diff options
author | nat-goodspeed <nat@lindenlab.com> | 2024-09-05 15:40:12 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-09-05 15:40:12 -0400 |
commit | 04568da18d2261f3f7b851cf5341b766c9648204 (patch) | |
tree | 83d5db1c173636bb77ebb33e860fac77ab5d79e8 /indra/newview/llhudrender.cpp | |
parent | 18d81e20f0b0044c16615953d7b69d7fb34d3449 (diff) | |
parent | ff2d79906ccef217194d5d9ec9d7025db03592a8 (diff) |
Merge pull request #2513 from secondlife/lua-merge-dev
Merge develop branch into Lua project branch.
Diffstat (limited to 'indra/newview/llhudrender.cpp')
-rw-r--r-- | indra/newview/llhudrender.cpp | 13 |
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(); |