summaryrefslogtreecommitdiff
path: root/indra/llrender/llfontvertexbuffer.cpp
diff options
context:
space:
mode:
authorAndrey Kleshchev <andreykproductengine@lindenlab.com>2024-09-30 18:28:00 +0300
committerAndrey Kleshchev <117672381+akleshchev@users.noreply.github.com>2024-10-28 16:47:19 +0200
commit200a196d31b0dd53ffc0acec31c8ec777aabc786 (patch)
tree103727d499f049a4c519e9b49079049ae9f399bd /indra/llrender/llfontvertexbuffer.cpp
parentb1fb2fba7078fe1b1f2fec9b57561f37d51f599a (diff)
viewer#2883 Regenerate font's matrix and depth instead of loading
to fix issues with nametags and window resizes
Diffstat (limited to 'indra/llrender/llfontvertexbuffer.cpp')
-rw-r--r--indra/llrender/llfontvertexbuffer.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/indra/llrender/llfontvertexbuffer.cpp b/indra/llrender/llfontvertexbuffer.cpp
index 32c8ddc598..5bd1ca5eed 100644
--- a/indra/llrender/llfontvertexbuffer.cpp
+++ b/indra/llrender/llfontvertexbuffer.cpp
@@ -213,6 +213,17 @@ void LLFontVertexBuffer::renderBuffers()
gGL.flush(); // deliberately empty pending verts
gGL.getTexUnit(0)->enable(LLTexUnit::TT_TEXTURE);
gGL.pushUIMatrix();
+
+ gGL.loadUIIdentity();
+
+ // Depth translation, so that floating text appears 'in-world'
+ // and is correctly occluded.
+ gGL.translatef(0.f, 0.f, LLFontGL::sCurDepth);
+ gGL.setSceneBlendType(LLRender::BT_ALPHA);
+
+ // Note: ellipses should technically be covered by push/load/translate of their own
+ // but it's more complexity, values do not change, skipping doesn't appear to break
+ // anything, so we can skip that until it proves to cause issues.
for (LLVertexBufferData& buffer : mBufferList)
{
buffer.draw();