summaryrefslogtreecommitdiff
path: root/indra/llui
diff options
context:
space:
mode:
authormobserveur <mobserveur@gmail.com>2024-06-28 11:23:08 +0200
committermobserveur <mobserveur@gmail.com>2024-06-28 11:23:08 +0200
commit1852ebd65df1748f071947204e440f1dece30f31 (patch)
tree43593fbb2838e9363502fbdbd0307da129b0db02 /indra/llui
parent9890ebc0978e0ec3567fb78dba4bd2d4a18855f3 (diff)
Apple GPU Optimisations
This commit massively improves 2D UI, 3D UI and 3D world rendering performance and smoothness.
Diffstat (limited to 'indra/llui')
-rw-r--r--indra/llui/llbadge.cpp18
1 files changed, 10 insertions, 8 deletions
diff --git a/indra/llui/llbadge.cpp b/indra/llui/llbadge.cpp
index f2b1f5720f..847aefafb3 100644
--- a/indra/llui/llbadge.cpp
+++ b/indra/llui/llbadge.cpp
@@ -202,15 +202,17 @@ void renderBadgeBackground(F32 centerX, F32 centerY, F32 width, F32 height, cons
ll_round(x) + width,
ll_round(y) + height);
- LLVector3 vertices[4];
- vertices[0] = LLVector3(screen_rect.mRight, screen_rect.mTop, 1.0f);
- vertices[1] = LLVector3(screen_rect.mLeft, screen_rect.mTop, 1.0f);
- vertices[2] = LLVector3(screen_rect.mLeft, screen_rect.mBottom, 1.0f);
- vertices[3] = LLVector3(screen_rect.mRight, screen_rect.mBottom, 1.0f);
-
- gGL.begin(LLRender::QUADS);
+ LLVector4a vertices[6];
+ vertices[0].set(screen_rect.mLeft, screen_rect.mTop, 1.0f);
+ vertices[1].set(screen_rect.mLeft, screen_rect.mBottom, 1.0f);
+ vertices[2].set(screen_rect.mRight, screen_rect.mTop, 1.0f);
+ vertices[3].set(screen_rect.mRight, screen_rect.mTop, 1.0f);
+ vertices[4].set(screen_rect.mLeft, screen_rect.mBottom, 1.0f);
+ vertices[5].set(screen_rect.mRight, screen_rect.mBottom, 1.0f);
+
+ gGL.begin(LLRender::TRIANGLES);
{
- gGL.vertexBatchPreTransformed(vertices, 4);
+ gGL.vertexBatchPreTransformed(vertices, 6);
}
gGL.end();