OpenGLGlyphTextRenderer.ixx File
OpenGL-based text renderer using FreeType glyph rendering. More...
Included Headers
#include <cassert>
#include <ft2build.h>
#include <glad/gl.h>
#include <iostream>
#include <memory>
#include <ostream>
#include <ranges>
#include <string>
#include <unordered_map>
#include <vector>
#include <helios.rendering.text.TextRenderCommand>
#include <helios.rendering.shader.UniformValueMap>
#include <helios.rendering.shader.UniformSemantics>
#include <helios.ext.opengl.rendering.shader.OpenGLShader>
#include <helios.rendering.text.Glyph>
#include <helios.rendering.RenderPass>
#include <helios.engine.core.data.FontId>
#include <helios.ext.opengl.rendering.FreeTypeFontResourceManager>
#include <helios.rendering.text.TextMesh>
#include <helios.math>
#include <helios.rendering.text.TextRenderer>
#include <helios.rendering.text.FontResourceProvider>
Namespaces Index
| namespace | helios |
| namespace | ext |
|
Platform-specific extensions and backend implementations. More... | |
| namespace | opengl |
|
OpenGL-specific implementations. More... | |
| namespace | rendering |
|
OpenGL rendering implementations. More... | |
Classes Index
| class | OpenGLGlyphTextRenderer |
|
Renders and manages text using OpenGL and FreeType. More... | |
Description
OpenGL-based text renderer using FreeType glyph rendering.
File Listing
The file content with the documentation metadata removed is:
40export namespace helios::ext::opengl::rendering {
55 class OpenGLGlyphTextRenderer : public helios::rendering::text::TextRenderer {
59 friend class OpenGLDevice;
101 mutable const helios::ext::opengl::rendering::shader::OpenGLShader* lastShader_ = nullptr;
132 const helios::engine::core::data::FontId fontId,
134 helios::rendering::text::FontResourceProvider* fontResourceProvider
158 glBufferSubData(GL_ARRAY_BUFFER, 0, sizeof(helios::math::vec4f) * stride, vertex.data());
197 ~OpenGLGlyphTextRenderer() override {
219 static inline int textTextureUnit() {
235 const helios::rendering::text::TextRenderCommand& command,
236 const helios::rendering::shader::UniformValueMap& frameUniformValues) noexcept override {
241 const auto* shader = static_cast<const helios::ext::opengl::rendering::shader::OpenGLShader*>(&baseShader);
242 assert(shader && "Unexpected failure when casting to OpenGLShader.");
244 if (lastShader_ != shader) {
245 shader->use();
246 lastShader_ = shader;
249 shader->applyUniformValues(frameUniformValues);
250 shader->applyUniformValues(command.objectUniformValues());;
251 shader->applyUniformValues(command.materialUniformValues());;
Generated via doxygen2docusaurus 2.0.0 by Doxygen 1.15.0.