Om  1.0.0
A universal framework for multimedia simulation
Classes | Public Member Functions | List of all members
om::graphics::gui::renderers::GlyphTextureCache Class Reference

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 GlyphTexturegetGlyph (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...
 
GraphicsContextgetContext () 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...
 

Detailed Description

A class that caches glyph textures for text rendering.

Constructor & Destructor Documentation

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.

Member Function Documentation

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.

GraphicsContext* om::graphics::gui::renderers::GlyphTextureCache::getContext ( ) const
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.


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