Draw to an opengl texture instead of the screen.
String of glyphs rendered with a font.
const std::string & get_font() const
Get font ID.
const std::string & get_text() const
Get text.
Alignment get_alignment() const
Get the text alignment.
void create(std::string_view text, const float size, const std::string &font, const graphics::Colour &colour, Alignment alignment=Alignment::LEFT)
Creates the rendered text.
Text & operator=(Text &&)
Move assignment operator.
void set_font(std::string_view font)
Update the font used.
graphics::Colour m_colour
Text colour.
graphics::RenderTexture & render_texture()
Get render texture.
graphics::Font * m_font
Pointer to font resource.
graphics::VertexArray m_vao
Vertex Array Object.
void update()
Update the rendered text.
Text & operator=(const Text &)=delete
Copy assignment operator.
graphics::VertexArray & vao()
Get vertex array.
graphics::RenderTexture m_rt
Font render texture.
Text(const Text &)=delete
Copy constructor.