From 3240fa7024ca762c8fdd7efeed1705fdea0b2b09 Mon Sep 17 00:00:00 2001 From: dec05eba Date: Wed, 21 Apr 2021 13:51:07 +0200 Subject: Use vertex buffer to render text --- include/Text.hpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'include') diff --git a/include/Text.hpp b/include/Text.hpp index 60d0db1..d25d47b 100644 --- a/include/Text.hpp +++ b/include/Text.hpp @@ -2,6 +2,7 @@ #include "NetUtils.hpp" #include +#include #include #include #include @@ -140,7 +141,11 @@ namespace QuickMedia sf::String str; // TODO: Remove this for non-editable text??? also replace with std::string? then we get more efficient editing of text const bool bold_font; unsigned int characterSize; + // 1: Normal text + // 2: CJK + // 3: Emoji sf::VertexArray vertices[3]; + sf::VertexBuffer vertex_buffers[3]; float maxWidth; sf::Vector2f position; sf::Color color; -- cgit v1.2.3