summaryrefslogtreecommitdiff
path: root/indra/llrender/llfontvertexbuffer.cpp
diff options
context:
space:
mode:
authorJonathan "Geenz" Goodman <geenz@lindenlab.com>2025-03-01 16:37:59 -0500
committerGitHub <noreply@github.com>2025-03-01 16:37:59 -0500
commit5d78ff48cb1f916180a2ffd10989eae50b81b4ec (patch)
treeeb1f22ba21082efbb023b1b85468ed7923d519fb /indra/llrender/llfontvertexbuffer.cpp
parent5aa359ed8d4d36e45c562cf56cb69580dc4236b4 (diff)
parent42ceac9695f7e098f15264977396a939c8ddfd23 (diff)
Merge pull request #3634 from secondlife/release/2024.12-ForeverFPS
Update develop with ForeverFPS
Diffstat (limited to 'indra/llrender/llfontvertexbuffer.cpp')
-rw-r--r--indra/llrender/llfontvertexbuffer.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/indra/llrender/llfontvertexbuffer.cpp b/indra/llrender/llfontvertexbuffer.cpp
index 5bd1ca5eed..a223509d30 100644
--- a/indra/llrender/llfontvertexbuffer.cpp
+++ b/indra/llrender/llfontvertexbuffer.cpp
@@ -146,7 +146,9 @@ S32 LLFontVertexBuffer::render(
|| mLastScaleY != LLFontGL::sScaleY
|| mLastVertDPI != LLFontGL::sVertDPI
|| mLastHorizDPI != LLFontGL::sHorizDPI
- || mLastOrigin != LLFontGL::sCurOrigin)
+ || mLastOrigin != LLFontGL::sCurOrigin
+ || mLastResGeneration != LLFontGL::sResolutionGeneration
+ || 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);
@@ -178,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,
@@ -201,6 +206,7 @@ void LLFontVertexBuffer::genBuffers(
mLastVertDPI = LLFontGL::sVertDPI;
mLastHorizDPI = LLFontGL::sHorizDPI;
mLastOrigin = LLFontGL::sCurOrigin;
+ mLastResGeneration = LLFontGL::sResolutionGeneration;
if (right_x)
{