|
guillaume 2026.6.1
A C++ UI framework designed for modern desktop and extended reality (XR) applications.
|
What a render system hands to the engine to draw a piece of text: glyph quads already placed in world coordinates. More...
#include <headers/guillaume/text_renderable.hpp>


Public Member Functions | |
| TextRenderable (std::shared_ptr< utility::RessourceProvider > ressourceProvider, const utility::graphic::PoseF &anchor, const utility::graphic::Color32Bit &color, const std::string &content, uint32_t fontSize, const std::string &font) | |
| Lay out a text and place its glyphs in world coordinates. | |
| ~TextRenderable (void) override=default | |
| Default destructor. | |
What a render system hands to the engine to draw a piece of text: glyph quads already placed in world coordinates.
systems::TextRender and systems::GlyphRender build one per entity and pass it to utility::Engine::createObject or updateObject.
utility::graphic::Text stores its glyph quads in local (object) space and relies on the renderer applying Renderable::getModelMatrix(). Every other drawable Guillaume emits (shapes, images, models) bakes world coordinates into its vertices and uses an identity pose, so a renderer that draws vertex buffers directly would leave text at the mesh origin.
This subclass keeps the Text renderable type (so the font material and the engine's text path are preserved) but rewrites the glyph vertices to world space and resets the pose to identity. Text then lands on its entity position whether or not the renderer applies the model matrix.
Definition at line 69 of file text_renderable.hpp.
|
inline |
Lay out a text and place its glyphs in world coordinates.
| ressourceProvider | The resource provider that loads the font file. |
| anchor | The pose of the entity: the top-left corner of the glyph box is put on its position and the text is turned by its orientation. |
| color | The color of the glyphs. |
| content | The characters to draw. |
| fontSize | The font size, passed on to utility::graphic::Text. It is a whole number: the render systems pass components::Text::getFontSize, whose fractional part is dropped by the conversion. |
| font | The path of the font file, relative to the resource root, for instance the result of theme::fontPath. |
Definition at line 89 of file text_renderable.hpp.