|
guillaume 2026.6.1
A C++ UI framework designed for modern desktop and extended reality (XR) applications.
|
Draws the icon of every entity that has a components::Glyph. More...
#include <headers/guillaume/systems/glyph_render.hpp>


Public Member Functions | |
| GlyphRender (std::shared_ptr< utility::RessourceProvider > ressourceProvider, utility::Engine &engine) | |
| Create the system in the Render phase and load the icon font and its code point table. | |
| ~GlyphRender (void) | |
| Forget the engine objects without removing them from the engine. | |
| void | prepare (void) override |
| Mark every icon as not drawn yet. Called once per frame before the entities are visited. | |
| void | cleanup (void) override |
| Remove the engine objects of the entities that were not drawn this frame. Called once per frame after the entities. | |
| virtual void | update (const ecs::Entity::Identifier &entityIdentifier) override |
| Build the renderable of one icon from its current components and upload it, creating the engine object on the first frame. | |
| Public Member Functions inherited from guillaume::systems::RenderHandleMap | |
| RenderHandleMap (void)=default | |
| Create an empty map. | |
| ~RenderHandleMap (void)=default | |
| Destroy the map without removing the engine objects it refers to. | |
| void | markAllUnused (void) |
| Clear the used flag of every handle. Call it from the system's prepare(), before any entity is drawn. | |
| void | removeUnused (utility::Engine &engine) |
| Remove from the engine, then from the map, every handle whose used flag is still false. Call it from the system's cleanup(). | |
| RenderHandle * | find (const ecs::Entity::Identifier &identifier) |
| Look up the handle of an entity. | |
| void | insert (const ecs::Entity::Identifier &identifier, RenderHandle handle) |
| Store the handle of an entity, replacing the one it had. | |
| std::size_t | size (void) const |
| Count the entities that have an engine object in this map. | |
| void | clear (void) |
| Forget every handle without calling utility::Engine::removeObject. Use it only when the engine objects are gone already or are destroyed with the engine. | |
| Public Member Functions inherited from guillaume::ecs::SystemFiller< components::Transform, components::Bound, components::Glyph, components::Color > | |
| SystemFiller (Phase phase) | |
| Create the system and set its signature from ComponentTypes. | |
| virtual | ~SystemFiller (void)=default |
| Virtual destructor. | |
| Public Member Functions inherited from guillaume::ecs::System | |
| System (Phase phase) | |
| Create a system that runs in a given phase, with an empty signature. | |
| virtual | ~System (void)=default |
| Virtual destructor. | |
| Phase | getPhase (void) const noexcept |
| Get the phase of the frame in which the system runs. | |
| Entity::Signature | getSignature (void) const noexcept |
| Get the component types an entity must declare to be visited by this system. | |
| void | routine (ecs::ComponentRegistry &componentRegistry, ecs::EntityRegistry &entityRegistry, const ecs::EntityTreeTraveler &traveler) |
| Run the system once over a scene: prepare(), update() on each matching entity, cleanup(). | |
| void | bindComponentRegistry (ecs::ComponentRegistry &componentRegistry) |
| Bind a component registry so update() can be called directly, without routine(). | |
| void | unbindComponentRegistry (void) |
| Drop the binding made by bindComponentRegistry(). | |
Additional Inherited Members | |
| Protected Member Functions inherited from guillaume::ecs::System | |
| template<InheritFromComponent... ComponentTypes> | |
| void | setSignature (void) |
| Replace the signature by the one made of the given component types. | |
| ecs::EntityRegistry & | getEntityRegistry (void) |
| Get the entity registry of the scene being processed. | |
| const ecs::EntityRegistry & | getEntityRegistry (void) const |
| Get the entity registry of the scene being processed, read-only. | |
| ecs::ComponentRegistry & | getComponentRegistry (void) |
| Get the component registry of the scene being processed. | |
| const ecs::ComponentRegistry & | getComponentRegistry (void) const |
| Get the component registry of the scene being processed, read-only. | |
| template<InheritFromComponent ComponentType> | |
| bool | hasComponent (const ecs::Entity::Identifier &entityIdentifier) const |
| Tell whether an entity has a component, in the bound registry. | |
| template<InheritFromComponent ComponentType> | |
| ComponentType & | getComponent (const ecs::Entity::Identifier &entityIdentifier) |
| Get a component of an entity from the bound registry, to read or modify it. | |
| template<InheritFromComponent ComponentType> | |
| const ComponentType & | getComponent (const ecs::Entity::Identifier &entityIdentifier) const |
| Get a component of an entity from the bound registry, read-only. | |
| template<InheritFromComponent ComponentType> | |
| bool | requireComponent (const ecs::Entity::Identifier &entityIdentifier) |
| Tell whether an entity has a component, and log a warning naming the entity and the component when it does not. | |
Draws the icon of every entity that has a components::Glyph.
An icon is one character of the Material Symbols icon font, chosen by name. This system runs in the Render phase on entities with Transform, Bound, Glyph and Color. It writes no component: its output is one engine object per entity (a TextRenderable), rebuilt and uploaded every frame.
Things to know:
Definition at line 68 of file glyph_render.hpp.
| guillaume::systems::GlyphRender::GlyphRender | ( | std::shared_ptr< utility::RessourceProvider > | ressourceProvider, |
| utility::Engine & | engine ) |
Create the system in the Render phase and load the icon font and its code point table.
A missing font or table is logged and does not throw.
| ressourceProvider | Provider used to load the font and the table. Must not be null. |
| engine | The engine the icons are uploaded to. It must outlive the system. |
Definition at line 32 of file glyph_render.cpp.

| guillaume::systems::GlyphRender::~GlyphRender | ( | void | ) |
Forget the engine objects without removing them from the engine.
Definition at line 63 of file glyph_render.cpp.

|
overridevirtual |
Remove the engine objects of the entities that were not drawn this frame. Called once per frame after the entities.
Reimplemented from guillaume::ecs::System.
Definition at line 73 of file glyph_render.cpp.

|
overridevirtual |
Mark every icon as not drawn yet. Called once per frame before the entities are visited.
Reimplemented from guillaume::ecs::System.
Definition at line 68 of file glyph_render.cpp.

|
overridevirtual |
Build the renderable of one icon from its current components and upload it, creating the engine object on the first frame.
| entityIdentifier | The entity to draw. It is skipped when the icon font is missing, and skipped with a log message when one of the four components is missing. |
Implements guillaume::ecs::System.
Definition at line 78 of file glyph_render.cpp.
