summaryrefslogtreecommitdiff
path: root/indra/llrender/llfontgl.h
diff options
context:
space:
mode:
authorAndrey Kleshchev <andreykproductengine@lindenlab.com>2024-08-28 23:05:58 +0300
committerAndrey Kleshchev <117672381+akleshchev@users.noreply.github.com>2024-09-04 10:16:46 +0300
commit4ae1de1f8a78d795958d67afab8356f9a13f707d (patch)
treeea0fe05983562f061a4748a6f4af7253018f9660 /indra/llrender/llfontgl.h
parent36423bd6603c5708028c6e8e9705587b961a4bb2 (diff)
viewer#2411 LLFontGL::render optimizations
Diffstat (limited to 'indra/llrender/llfontgl.h')
-rw-r--r--indra/llrender/llfontgl.h15
1 files changed, 14 insertions, 1 deletions
diff --git a/indra/llrender/llfontgl.h b/indra/llrender/llfontgl.h
index de7529a583..5015601cf6 100644
--- a/indra/llrender/llfontgl.h
+++ b/indra/llrender/llfontgl.h
@@ -33,6 +33,7 @@
#include "llimagegl.h"
#include "llpointer.h"
#include "llrect.h"
+#include "llvertexbuffer.h"
#include "v2math.h"
class LLColor4;
@@ -42,6 +43,7 @@ class LLFontFreetype;
// Structure used to store previously requested fonts.
class LLFontRegistry;
+class LLVertexBuffer;
class LLFontGL
{
@@ -79,6 +81,16 @@ public:
DROP_SHADOW_SOFT
};
+ struct LLVertexBufferData
+ {
+ LLVertexBufferData() : mBuffer(nullptr), mImage(nullptr), mMode(0), mCount(0) {}
+ LLVertexBufferData(LLVertexBuffer* buffer, LLImageGL* image, U8 mode, U32 count) : mBuffer(buffer), mImage(image), mMode(mode), mCount(count) {}
+ LLPointer<LLVertexBuffer> mBuffer;
+ LLPointer <LLImageGL> mImage; // might be a better idea to store
+ U8 mMode;
+ U32 mCount;
+ };
+
LLFontGL();
~LLFontGL();
@@ -119,7 +131,8 @@ public:
S32 max_chars = S32_MAX, S32 max_pixels = S32_MAX,
F32* right_x=NULL,
bool use_ellipses = false,
- bool use_color = true) const;
+ bool use_color = true,
+ std::list<LLVertexBufferData>* buffer_list = nullptr) const;
S32 render(const LLWString &text, S32 begin_offset, F32 x, F32 y, const LLColor4 &color) const;