diff options
author | Oz Linden <oz@lindenlab.com> | 2012-01-04 09:06:07 -0500 |
---|---|---|
committer | Oz Linden <oz@lindenlab.com> | 2012-01-04 09:06:07 -0500 |
commit | 1ce22e0a5dd62bc6a750fbdd39719190360af611 (patch) | |
tree | 479fae0c1324a5de8fa23c04c406ebc8fb7a3632 /indra/llrender | |
parent | ef0057909fcf7eaee6bdff4a58492fd17ffdd9a4 (diff) | |
parent | 570d562f5871f40bd7f8c683db5316ffd0133335 (diff) |
merge changes for latest viewer-development
Diffstat (limited to 'indra/llrender')
-rw-r--r-- | indra/llrender/llfontgl.cpp | 12 |
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); |