TextShaderProperties Class
Immutable shader properties for text rendering. More...
Declaration
Public Constructors Index
| TextShaderProperties (const helios::math::vec4f baseColor=helios::util::Colors::White) | |
|
Constructs TextShaderProperties with the specified color. More... | |
Public Member Functions Index
| void | writeUniformValues (helios::rendering::shader::UniformValueMap &uniformValueMap) const noexcept |
|
Writes the text shader properties to a uniform value map. More... | |
Private Member Attributes Index
| helios::math::vec4f | baseColor_ |
|
Base text color (RGBA). More... | |
Description
Immutable shader properties for text rendering.
`TextShaderProperties` defines the base visual properties for rendering text, such as the text color. These properties are typically shared across multiple `TextRenderable` instances via a `TextRenderPrototype`.
## Usage
```cpp // Create text properties with a custom color auto textProps = std::make_shared<TextShaderProperties>( helios::util::Colors::Red );
// Use with a render prototype auto prototype = std::make_shared<TextRenderPrototype>(shader, textProps, fontProvider); ```
- See Also
- See Also
- See Also
UniformSemantics::TextColor
Definition at line 47 of file TextShaderProperties.ixx.
Public Constructors
TextShaderProperties()
| inline explicit |
Constructs TextShaderProperties with the specified color.
- Parameters
-
baseColor The text color. Defaults to white.
Definition at line 63 of file TextShaderProperties.ixx.
Reference helios::util::Colors::White.
Public Member Functions
writeUniformValues()
| inline noexcept |
Writes the text shader properties to a uniform value map.
Sets the `UniformSemantics::TextColor` uniform to the base color.
- Parameters
-
uniformValueMap The uniform value map to write to.
Definition at line 75 of file TextShaderProperties.ixx.
Reference helios::rendering::shader::TextColor.
Private Member Attributes
baseColor_
|
Base text color (RGBA).
Definition at line 54 of file TextShaderProperties.ixx.
The documentation for this class was generated from the following file:
Generated via doxygen2docusaurus 2.0.0 by Doxygen 1.15.0.