diff options
author | prep <prep@lindenlab.com> | 2012-01-04 13:14:03 -0500 |
---|---|---|
committer | prep <prep@lindenlab.com> | 2012-01-04 13:14:03 -0500 |
commit | ce49cbc00e9f6ed8fe43c913b02669103fbb1472 (patch) | |
tree | b192267f163d6059c7b74824c9254f51223dd2c4 /indra/llrender/llfontgl.cpp | |
parent | 06bfbf61e16ffec0e54f131a7f3b37c475f10cd9 (diff) | |
parent | 3fd7752f1289f67db93e76833cc9804d057bc3c8 (diff) |
merge
Diffstat (limited to 'indra/llrender/llfontgl.cpp')
-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); |