Skip to main content

TextRenderer Class

Abstract interface for text rendering implementations. More...

Declaration

class helios::rendering::text::TextRenderer { ... }

Derived Classes

classOpenGLGlyphTextRenderer

Renders and manages text using OpenGL and FreeType. More...

Public Destructor Index

~TextRenderer ()=default

Virtual destructor for proper cleanup of derived classes. More...

Public Member Functions Index

voidrender (const TextRenderCommand &command, const helios::rendering::shader::UniformValueMap &frameUniformValues) noexcept=0

Renders text based on the given command. More...

Description

Abstract interface for text rendering implementations.

`TextRenderer` defines the contract for rendering text in the helios engine. Concrete implementations handle the specifics of text rendering for different graphics APIs (e.g., OpenGL, Vulkan).

## Responsibilities

  • **Font Management:** Load and cache font families for efficient glyph rendering.
  • **Text Rendering:** Process `TextRenderCommand` objects and render text to screen.

## Usage

Implementations must override both pure virtual methods:

```cpp class MyTextRenderer : public TextRenderer { public: void addFontFamily(FontId fontId, std::string_view path, unsigned short begin, unsigned short end) override { // Load font and cache glyphs }

void render(const TextRenderCommand& command, const UniformValueMap& frameUniformValues) noexcept override { // Render text based on command properties } }; ```

See Also

OpenGLGlyphTextRenderer

See Also

TextRenderCommand

Definition at line 53 of file TextRenderer.ixx.

Public Destructor

~TextRenderer()

virtual helios::rendering::text::TextRenderer::~TextRenderer ()
virtual default

Virtual destructor for proper cleanup of derived classes.

Definition at line 59 of file TextRenderer.ixx.

Public Member Functions

render()

virtual void helios::rendering::text::TextRenderer::render (const TextRenderCommand & command, const helios::rendering::shader::UniformValueMap & frameUniformValues)
noexcept

Renders text based on the given command.

Processes a `TextRenderCommand` and renders the specified text using the associated shader and font. The implementation should apply both the command-specific uniform values and the frame-level uniform values.

Parameters
command

The render command containing text, position, scale, and shader information.

frameUniformValues

Frame-level uniform values (e.g., projection matrix) to apply.

info

This method is marked `noexcept` and must not throw exceptions.

Definition at line 73 of file TextRenderer.ixx.


The documentation for this class was generated from the following file:


Generated via doxygen2docusaurus 2.0.0 by Doxygen 1.15.0.