Om
1.0.0
A universal framework for multimedia simulation
|
A class that caches glyph textures for text rendering. More...
#include <omGraphicsGUIGlyphTextureCache.h>
Classes | |
class | GlyphTexture |
A class that stores the texture and UV coordinates of a single glyph. More... | |
Public Member Functions | |
GlyphTextureCache () | |
Create a new glyph texture cache with no context. More... | |
~GlyphTextureCache () | |
Destroy a glyph texture cache and release all internal data. More... | |
const FontCache * | getFontCache (Font *font, Float fontSize) const |
Return a pointer to an opaque font cache for the given font and font size. More... | |
const GlyphTexture * | getGlyph (const FontCache *fontCache, UTF32Char character) const |
Return a pointer to the glyph texture for the specified font cache and character code. More... | |
void | clearGlyphs () |
Clear all cached glyph textures from this glyph texture cache. More... | |
GraphicsContext * | getContext () const |
Return a pointer to the graphics context which this texture cache uses to create textures. More... | |
void | setContext (GraphicsContext *newContext) |
Set a pointer to the graphics context which this texture cache uses to create textures. More... | |
A class that caches glyph textures for text rendering.
om::graphics::gui::renderers::GlyphTextureCache::GlyphTextureCache | ( | ) |
Create a new glyph texture cache with no context.
om::graphics::gui::renderers::GlyphTextureCache::~GlyphTextureCache | ( | ) |
Destroy a glyph texture cache and release all internal data.
const FontCache* om::graphics::gui::renderers::GlyphTextureCache::getFontCache | ( | Font * | font, |
Float | fontSize | ||
) | const |
Return a pointer to an opaque font cache for the given font and font size.
If the method fails, a NULL pointer is returned, indicating that either the font or graphics context is invalid.
const GlyphTexture* om::graphics::gui::renderers::GlyphTextureCache::getGlyph | ( | const FontCache * | fontCache, |
UTF32Char | character | ||
) | const |
Return a pointer to the glyph texture for the specified font cache and character code.
If the method fails, a NULL pointer is returned, indicating that the font cache is NULL or invalid or that the specified character does not exist in the font.
void om::graphics::gui::renderers::GlyphTextureCache::clearGlyphs | ( | ) |
Clear all cached glyph textures from this glyph texture cache.
|
inline |
Return a pointer to the graphics context which this texture cache uses to create textures.
void om::graphics::gui::renderers::GlyphTextureCache::setContext | ( | GraphicsContext * | newContext | ) |
Set a pointer to the graphics context which this texture cache uses to create textures.
This causes the texture cache to be reset to its inital state with no cached glyphs.