summaryrefslogtreecommitdiff
path: root/indra/llrender
diff options
context:
space:
mode:
authorDebi King (Dessie) <dessie@lindenlab.com>2012-01-19 15:49:48 -0500
committerDebi King (Dessie) <dessie@lindenlab.com>2012-01-19 15:49:48 -0500
commit7e9ba401d1489ef96c5315f03332f28d62d97899 (patch)
treec2eabeb3f4f635ae49e5a3e9b07da54dad30eee2 /indra/llrender
parent2abb1a81c56a27eab02157851cb9e67730231bb6 (diff)
parent4c5141c5677a2e98c1331026d4e119abee6ab2ae (diff)
reconciled .hgtags
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);