summaryrefslogtreecommitdiff
path: root/indra/llrender
diff options
context:
space:
mode:
authorOz Linden <oz@lindenlab.com>2011-12-15 16:04:40 -0500
committerOz Linden <oz@lindenlab.com>2011-12-15 16:04:40 -0500
commitc0f5b24b549685efda4051e47525c347b4fde0e1 (patch)
treebe5154dce652a3536d7388a1ff2e8380257daec1 /indra/llrender
parent1b6ee87bc8efa0eace9441c8907c9743aaab19b4 (diff)
parenta94a923240ba6e9928010432e1e815ea69edd6b7 (diff)
merge changes for storm-1723
Diffstat (limited to 'indra/llrender')
-rw-r--r--indra/llrender/llfontgl.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/indra/llrender/llfontgl.cpp b/indra/llrender/llfontgl.cpp
index 607473d416..82e8227ffe 100644
--- a/indra/llrender/llfontgl.cpp
+++ b/indra/llrender/llfontgl.cpp
@@ -304,6 +304,18 @@ S32 LLFontGL::render(const LLWString &wstr, S32 begin_offset, F32 x, F32 y, cons
S32 next_bitmap_num = fgi->mBitmapNum;
if (next_bitmap_num != bitmap_num)
{
+ // Actually draw the queued glyphs before switching their texture;
+ // otherwise the queued glyphs will be taken from wrong textures.
+ if (glyph_count > 0)
+ {
+ gGL.begin(LLRender::QUADS);
+ {
+ gGL.vertexBatchPreTransformed(vertices, uvs, colors, glyph_count * 4);
+ }
+ gGL.end();
+ glyph_count = 0;
+ }
+
bitmap_num = next_bitmap_num;
LLImageGL *font_image = font_bitmap_cache->getImageGL(bitmap_num);
gGL.getTexUnit(0)->bind(font_image);