|
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 geometry: a list of meshes and the name of the material to draw them with. More...
#include <headers/guillaume/mesh_renderable.hpp>


Public Member Functions | |
| MeshRenderable (std::vector< utility::graphic::Mesh > meshes, std::string materialName) | |
| Create a renderable from meshes and a material name. | |
| ~MeshRenderable (void) override=default | |
| Default destructor. | |
| utility::graphic::Renderable::RenderableType | getRenderableType (void) const override |
| Tell the engine which kind of renderable this is. | |
| std::string | getMaterialName (void) const override |
| Get the name of the material the engine draws the meshes with. | |
What a render system hands to the engine to draw geometry: a list of meshes and the name of the material to draw them with.
The render systems (systems::RectangleRender, systems::ImageRender, systems::MeshRender, ...) build the meshes of an entity on the CPU with the vertices already in world coordinates, wrap them in a MeshRenderable, and pass it to utility::Engine::createObject or updateObject. The material name tells the engine how to shade them: "mesh_material" for flat colored shapes, "image_<path>" for a textured one.
The renderable types of the utility library each have a fixed material name; this class exists to choose it per object.
Definition at line 52 of file mesh_renderable.hpp.
| guillaume::MeshRenderable::MeshRenderable | ( | std::vector< utility::graphic::Mesh > | meshes, |
| std::string | materialName ) |
Create a renderable from meshes and a material name.
| meshes | The meshes to draw, with vertices in world coordinates. Each one is copied into the renderable. |
| materialName | The name of the material the engine should use, for instance "mesh_material". |
|
override |
Get the name of the material the engine draws the meshes with.
|
override |
Tell the engine which kind of renderable this is.