libgui 2.01
libgui is a GUI library for the GameCube, Wii, and Wii U
 
Loading...
Searching...
No Matches
WutGlyphRenderer Class Reference

GX2-backed GlyphRenderer for GuiTextRenderer, using Texture2DShader for glyph quads and ColorShader for solid "feature" rectangles. More...

#include <WutVideoDriver.h>

Inheritance diagram for WutGlyphRenderer:
[legend]

Public Member Functions

 WutGlyphRenderer (WutVideoDriver *driver)
 
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 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).
 

Detailed Description

GX2-backed GlyphRenderer for GuiTextRenderer, using Texture2DShader for glyph quads and ColorShader for solid "feature" rectangles.

Definition at line 242 of file WutVideoDriver.h.

Constructor & Destructor Documentation

◆ WutGlyphRenderer()

WutGlyphRenderer::WutGlyphRenderer ( WutVideoDriver * driver)
Parameters
driverThe video driver draws are queued on

Definition at line 796 of file WutVideoDriver.cpp.

Member Function Documentation

◆ createTexture()

void * WutGlyphRenderer::createTexture ( uint16_t width,
uint16_t height )
overridevirtual

Allocates an empty single-channel glyph texture. Returns an opaque handle.

Implements GlyphRenderer.

Definition at line 802 of file WutVideoDriver.cpp.

◆ destroyTexture()

void WutGlyphRenderer::destroyTexture ( void * texture)
overridevirtual

Destroys a texture created by createTexture().

Implements GlyphRenderer.

Definition at line 853 of file WutVideoDriver.cpp.

◆ drawFeature()

void WutGlyphRenderer::drawFeature ( int16_t screenX,
int16_t screenY,
uint16_t width,
uint16_t height,
const PixelColor & color )
overridevirtual

Draws a solid-color rectangle used for text decoration (underline/strike-through).

Implements GlyphRenderer.

Definition at line 886 of file WutVideoDriver.cpp.

◆ drawQuad()

void WutGlyphRenderer::drawQuad ( void * texture,
int16_t screenX,
int16_t screenY,
uint16_t width,
uint16_t height,
const PixelColor & color )
overridevirtual

Draws a glyph texture as a quad tinted with color.

Implements GlyphRenderer.

Definition at line 866 of file WutVideoDriver.cpp.

◆ loadTextureData()

void WutGlyphRenderer::loadTextureData ( void * texture,
FT_Bitmap * bitmap )
overridevirtual

Uploads a rasterized FreeType glyph bitmap into a texture from createTexture().

Implements GlyphRenderer.

Definition at line 828 of file WutVideoDriver.cpp.


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