summaryrefslogtreecommitdiff
path: root/indra/llrender
diff options
context:
space:
mode:
authorBrad Linden <brad@lindenlab.com>2024-10-01 12:44:13 -0700
committerBrad Linden <brad@lindenlab.com>2024-10-01 12:44:13 -0700
commit002a81ccf5a64fd08e29811a6edea36f2e0408be (patch)
tree1ca8b593778d904d5f280aff94be2288d73567af /indra/llrender
parent59ed2d55a1d84ecf879ff564aaf02744f2dc7c7a (diff)
parent690f099519e155220535e07539238139b16da99f (diff)
Merge remote-tracking branch 'origin/release/2024.09-ExtraFPS' into develop
Diffstat (limited to 'indra/llrender')
-rw-r--r--indra/llrender/llfontvertexbuffer.cpp7
-rw-r--r--indra/llrender/llfontvertexbuffer.h4
-rw-r--r--indra/llrender/llrender2dutils.cpp6
3 files changed, 14 insertions, 3 deletions
diff --git a/indra/llrender/llfontvertexbuffer.cpp b/indra/llrender/llfontvertexbuffer.cpp
index 392f235aad..f5d6b03cd6 100644
--- a/indra/llrender/llfontvertexbuffer.cpp
+++ b/indra/llrender/llfontvertexbuffer.cpp
@@ -31,6 +31,8 @@
#include "llvertexbuffer.h"
+bool LLFontVertexBuffer::sEnableBufferCollection = true;
+
LLFontVertexBuffer::LLFontVertexBuffer()
{
}
@@ -119,6 +121,11 @@ S32 LLFontVertexBuffer::render(
{
return static_cast<S32>(text.length());
}
+ if (!sEnableBufferCollection)
+ {
+ // For debug purposes and performance testing
+ return fontp->render(text, begin_offset, x, y, color, halign, valign, style, shadow, max_chars, max_pixels, right_x, use_ellipses, use_color);
+ }
if (mBufferList.empty())
{
genBuffers(fontp, text, begin_offset, x, y, color, halign, valign,
diff --git a/indra/llrender/llfontvertexbuffer.h b/indra/llrender/llfontvertexbuffer.h
index 67cf2ca13c..59cb536b74 100644
--- a/indra/llrender/llfontvertexbuffer.h
+++ b/indra/llrender/llfontvertexbuffer.h
@@ -78,6 +78,8 @@ public:
F32* right_x = NULL,
bool use_ellipses = false,
bool use_color = true);
+
+ static void enableBufferCollection(bool enable) { sEnableBufferCollection = enable; }
private:
void genBuffers(const LLFontGL* fontp,
@@ -114,6 +116,8 @@ private:
F32 mLastScaleX = 1.f;
F32 mLastScaleY = 1.f;
LLCoordGL mLastOrigin;
+
+ static bool sEnableBufferCollection;
};
#endif
diff --git a/indra/llrender/llrender2dutils.cpp b/indra/llrender/llrender2dutils.cpp
index 0cd0c5fe6e..971241ed05 100644
--- a/indra/llrender/llrender2dutils.cpp
+++ b/indra/llrender/llrender2dutils.cpp
@@ -1712,10 +1712,10 @@ void gl_segmented_rect_3d_tex(const LLRectf& clip_rect, const LLRectf& center_uv
gGL.vertex3fv((center_draw_rect.mRight * width_vec + height_vec).mV);
gGL.texCoord2f(center_uv_rect.mLeft, center_uv_rect.mTop);
- gGL.vertex3fv((center_draw_rect.mLeft* width_vec + center_draw_rect.mTop * height_vec).mV);
+ gGL.vertex3fv((center_draw_rect.mLeft * width_vec + center_draw_rect.mTop * height_vec).mV);
- gGL.texCoord2f(center_uv_rect.mRight, center_uv_rect.mTop);
- gGL.vertex3fv((center_draw_rect.mRight* width_vec + center_draw_rect.mTop * height_vec).mV);
+ gGL.texCoord2f(center_uv_rect.mRight, clip_rect.mTop);
+ gGL.vertex3fv((center_draw_rect.mRight* width_vec + height_vec).mV);
gGL.texCoord2f(center_uv_rect.mLeft, clip_rect.mTop);
gGL.vertex3fv((center_draw_rect.mLeft * width_vec + height_vec).mV);