aboutsummaryrefslogtreecommitdiff
path: root/include/Text.hpp
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2021-04-21 13:51:07 +0200
committerdec05eba <dec05eba@protonmail.com>2021-04-21 13:51:07 +0200
commit3240fa7024ca762c8fdd7efeed1705fdea0b2b09 (patch)
tree71087292d91d8aca7b29321277fd96c24a579d03 /include/Text.hpp
parent3ac1120fd40b84507c51f867559bd05adff4eecf (diff)
Use vertex buffer to render text
Diffstat (limited to 'include/Text.hpp')
-rw-r--r--include/Text.hpp5
1 files changed, 5 insertions, 0 deletions
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 <SFML/Graphics/VertexArray.hpp>
+#include <SFML/Graphics/VertexBuffer.hpp>
#include <SFML/System/String.hpp>
#include <SFML/System/Clock.hpp>
#include <vector>
@@ -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;