GX-backed GlyphRenderer for GuiTextRenderer. More...
#include <OgcVideoDriver.h>
Public Member Functions | |
| OgcGlyphRenderer (uint8_t vtxFmtIndex=GX_VTXFMT1) | |
| void * | createTexture (uint16_t width, uint16_t height) override |
| Allocates an empty single-channel glyph texture. Returns an opaque handle. | |
| void | loadTextureData (void *texture, FT_Bitmap *bitmap) override |
| Uploads a rasterized FreeType glyph bitmap into a texture from createTexture(). | |
| void | destroyTexture (void *texture) override |
| Destroys a texture created by createTexture(). | |
| void | beginText () override |
| Bracket the drawQuad() calls for the glyphs of one string, so a renderer whose draws need state set up (a texture shader, a blend mode) can set it once for the string rather than for every glyph. | |
| void | endText () override |
| void | drawQuad (void *texture, int16_t screenX, int16_t screenY, uint16_t width, uint16_t height, const PixelColor &color) override |
| Draws a glyph texture as a quad tinted with color. | |
| void | drawFeature (int16_t screenX, int16_t screenY, uint16_t width, uint16_t height, const PixelColor &color) override |
| Draws a solid-color rectangle used for text decoration (underline/strike-through). | |
| void | setVertexFormat (uint8_t vtxFmtIndex) |
| Changes which GX vertex format slot subsequent draws use. | |
GX-backed GlyphRenderer for GuiTextRenderer.
Tracks its own GX vertex format index (see setVertexFormat()) so it can be reused across draws.
Definition at line 71 of file OgcVideoDriver.h.
| OgcGlyphRenderer::OgcGlyphRenderer | ( | uint8_t | vtxFmtIndex = GX_VTXFMT1 | ) |
| vtxFmtIndex | GX vertex format slot this renderer's draws use |
Definition at line 12 of file OgcGlyphRenderer.cpp.
|
override |
Definition at line 16 of file OgcGlyphRenderer.cpp.
|
overridevirtual |
Bracket the drawQuad() calls for the glyphs of one string, so a renderer whose draws need state set up (a texture shader, a blend mode) can set it once for the string rather than for every glyph.
Reimplemented from GlyphRenderer.
Definition at line 96 of file OgcGlyphRenderer.cpp.
|
overridevirtual |
Allocates an empty single-channel glyph texture. Returns an opaque handle.
Implements GlyphRenderer.
Definition at line 26 of file OgcGlyphRenderer.cpp.
|
overridevirtual |
Destroys a texture created by createTexture().
Implements GlyphRenderer.
Definition at line 88 of file OgcGlyphRenderer.cpp.
|
overridevirtual |
Draws a solid-color rectangle used for text decoration (underline/strike-through).
Implements GlyphRenderer.
Definition at line 159 of file OgcGlyphRenderer.cpp.
|
overridevirtual |
Draws a glyph texture as a quad tinted with color.
Implements GlyphRenderer.
Definition at line 108 of file OgcGlyphRenderer.cpp.
|
overridevirtual |
Reimplemented from GlyphRenderer.
Definition at line 102 of file OgcGlyphRenderer.cpp.
|
overridevirtual |
Uploads a rasterized FreeType glyph bitmap into a texture from createTexture().
Implements GlyphRenderer.
Definition at line 44 of file OgcGlyphRenderer.cpp.
| void OgcGlyphRenderer::setVertexFormat | ( | uint8_t | vtxFmtIndex | ) |
Changes which GX vertex format slot subsequent draws use.
Definition at line 18 of file OgcGlyphRenderer.cpp.