summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
authorAndrey Kleshchev <andreykproductengine@lindenlab.com>2024-10-25 21:48:51 +0300
committerAndrey Kleshchev <117672381+akleshchev@users.noreply.github.com>2024-10-28 16:47:19 +0200
commitb1fb2fba7078fe1b1f2fec9b57561f37d51f599a (patch)
tree16069dcec522111586b42f01c929a6838437ba55 /indra
parent05858ee68bc9bc3fd04c5f593c37f21b1c68a7ac (diff)
viewer#2883 Account for DPI changes
Diffstat (limited to 'indra')
-rw-r--r--indra/llrender/llfontvertexbuffer.cpp4
-rw-r--r--indra/llrender/llfontvertexbuffer.h2
2 files changed, 6 insertions, 0 deletions
diff --git a/indra/llrender/llfontvertexbuffer.cpp b/indra/llrender/llfontvertexbuffer.cpp
index f5d6b03cd6..32c8ddc598 100644
--- a/indra/llrender/llfontvertexbuffer.cpp
+++ b/indra/llrender/llfontvertexbuffer.cpp
@@ -144,6 +144,8 @@ S32 LLFontVertexBuffer::render(
|| mLastShadow != shadow // ex: buttons change shadow state
|| mLastScaleX != LLFontGL::sScaleX
|| mLastScaleY != LLFontGL::sScaleY
+ || mLastVertDPI != LLFontGL::sVertDPI
+ || mLastHorizDPI != LLFontGL::sHorizDPI
|| mLastOrigin != LLFontGL::sCurOrigin)
{
genBuffers(fontp, text, begin_offset, x, y, color, halign, valign,
@@ -196,6 +198,8 @@ void LLFontVertexBuffer::genBuffers(
mLastScaleX = LLFontGL::sScaleX;
mLastScaleY = LLFontGL::sScaleY;
+ mLastVertDPI = LLFontGL::sVertDPI;
+ mLastHorizDPI = LLFontGL::sHorizDPI;
mLastOrigin = LLFontGL::sCurOrigin;
if (right_x)
diff --git a/indra/llrender/llfontvertexbuffer.h b/indra/llrender/llfontvertexbuffer.h
index 59cb536b74..af195dfff9 100644
--- a/indra/llrender/llfontvertexbuffer.h
+++ b/indra/llrender/llfontvertexbuffer.h
@@ -115,6 +115,8 @@ private:
// LLFontGL's statics
F32 mLastScaleX = 1.f;
F32 mLastScaleY = 1.f;
+ F32 mLastVertDPI = 0.f;
+ F32 mLastHorizDPI = 0.f;
LLCoordGL mLastOrigin;
static bool sEnableBufferCollection;