28 Text(
const std::string &font,
int size,
const std::string &text,
31 glm::vec2 GetSize()
const override {
return m_Size; };
63 void InitVertexArray();
64 void InitUniformBuffer();
73 static constexpr int UNIFORM_SURFACE_LOCATION = 0;
75 static std::unique_ptr<Core::Program> s_Program;
76 static std::unique_ptr<Core::VertexArray> s_VertexArray;
77 std::unique_ptr<Core::UniformBuffer<Core::Matrices>> m_UniformBuffer;
80 std::unique_ptr<Core::Texture> m_Texture =
nullptr;
81 std::unique_ptr<TTF_Font, std::function<void(TTF_Font *)>> m_Font;
void SetText(const std::string &text)
Sets the text to the specified string.
Definition Text.hpp:38
void Draw(const Core::Matrices &data) override
Draws the text with a given transform and z-index.
void SetColor(const Util::Color &color)
Sets the color of the text.
Definition Text.hpp:48