summaryrefslogtreecommitdiff
path: root/indra/llrender/llfontvertexbuffer.cpp
diff options
context:
space:
mode:
authorErik Kundiman <erik@megapahit.org>2025-03-06 09:36:23 +0800
committerErik Kundiman <erik@megapahit.org>2025-03-06 09:36:23 +0800
commitd13a43c74f9c7e450f87edab0bcd9db39ee7c56e (patch)
treed40e4e3c1f5ce0cf80b11b2d03568c48cfc5e88f /indra/llrender/llfontvertexbuffer.cpp
parent5bf93b728ca7c671b6b812e753a40dcdb55b5d0d (diff)
parentaa060ae56c62869bb1d0f590e9a6eb681aabcefc (diff)
Merge remote-tracking branch 'secondlife/release/2025.03' into 2025.03
Diffstat (limited to 'indra/llrender/llfontvertexbuffer.cpp')
-rw-r--r--indra/llrender/llfontvertexbuffer.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/indra/llrender/llfontvertexbuffer.cpp b/indra/llrender/llfontvertexbuffer.cpp
index b53a841a87..a223509d30 100644
--- a/indra/llrender/llfontvertexbuffer.cpp
+++ b/indra/llrender/llfontvertexbuffer.cpp
@@ -148,7 +148,7 @@ S32 LLFontVertexBuffer::render(
|| mLastHorizDPI != LLFontGL::sHorizDPI
|| mLastOrigin != LLFontGL::sCurOrigin
|| mLastResGeneration != LLFontGL::sResolutionGeneration
- || mLastFontGlyphCount != fontp->getKnownGlyphCount())
+ || mLastFontCacheGen != fontp->getCacheGeneration())
{
genBuffers(fontp, text, begin_offset, x, y, color, halign, valign,
style, shadow, max_chars, max_pixels, right_x, use_ellipses, use_color);
@@ -180,6 +180,9 @@ void LLFontVertexBuffer::genBuffers(
{
// todo: add a debug build assert if this triggers too often for to long?
mBufferList.clear();
+ // Save before rendreing, it can change mid-render,
+ // so will need to rerender previous characters
+ mLastFontCacheGen = fontp->getCacheGeneration();
gGL.beginList(&mBufferList);
mChars = fontp->render(text, begin_offset, x, y, color, halign, valign,
@@ -204,7 +207,6 @@ void LLFontVertexBuffer::genBuffers(
mLastHorizDPI = LLFontGL::sHorizDPI;
mLastOrigin = LLFontGL::sCurOrigin;
mLastResGeneration = LLFontGL::sResolutionGeneration;
- mLastFontGlyphCount = fontp->getKnownGlyphCount();
if (right_x)
{