utility 2026.1.9
A comprehensive C++ utilities library tailored for the development of modern desktop and extended reality (XR) applications.
Loading...
Searching...
No Matches
text_material.cpp
1/*
2** ETIB PROJECT, 2026
3** utility
4** File description:
5** text_material
6*/
7
8#include <utility/graphic/text/text_material.hpp>
9
10namespace utility::graphic
11{
13 {
14 _shaderName = "text";
15 _alphaMode = AlphaMode::Blend;
16 _version = 0;
17 }
18
19 void TextMaterial::addAtlas(const std::string &name,
20 std::shared_ptr<Texture> atlas)
21 {
22 _textures[name] = atlas;
23 _version++;
24 }
25
26} // namespace utility::graphic
std::string _shaderName
The name of the shader associated with this material.
Definition material.hpp:170
std::map< std::string, std::shared_ptr< Texture > > _textures
A map of texture names to Texture objects associated with this material.
Definition material.hpp:176
uint32_t _version
A version number for the material, used for tracking changes and updates.
Definition material.hpp:182
AlphaMode _alphaMode
The alpha semantics of this material.
Definition material.hpp:187
TextMaterial()
Constructs a TextMaterial object that is synchronized with the provided Font object.
void addAtlas(const std::string &name, std::shared_ptr< Texture > atlas)
Add a texture atlas to the material with the specified name and Texture object.