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

A class that caches glyph textures for text rendering. More...

#include <omGraphicsGUIImageTextureCache.h>

Classes

class  GlyphTexture
 A class that stores the texture and UV coordinates of a single glyph. More...
 

Public Member Functions

 ImageTextureCache ()
 Create a new image texture cache with no context. More...
 
 ImageTextureCache (GraphicsContext *newContext)
 Create a new image texture cache which uses the specified context to create textures. More...
 
 ~ImageTextureCache ()
 Destroy an image texture cache and release all internal data. More...
 
Bool getImageTexture (Image *image, Texture *&texture)
 Get the texture for the specified image from the cache and/or create a new texture for the image. More...
 
void clearImages ()
 Clear all cached image textures from this image 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::ImageTextureCache::ImageTextureCache ( )

Create a new image texture cache with no context.

om::graphics::gui::renderers::ImageTextureCache::ImageTextureCache ( GraphicsContext newContext)

Create a new image texture cache which uses the specified context to create textures.

om::graphics::gui::renderers::ImageTextureCache::~ImageTextureCache ( )

Destroy an image texture cache and release all internal data.

Member Function Documentation

Bool om::graphics::gui::renderers::ImageTextureCache::getImageTexture ( Image *  image,
Texture *&  texture 
)

Get the texture for the specified image from the cache and/or create a new texture for the image.

void om::graphics::gui::renderers::ImageTextureCache::clearImages ( )

Clear all cached image textures from this image texture cache.

GraphicsContext* om::graphics::gui::renderers::ImageTextureCache::getContext ( ) const
inline

Return a pointer to the graphics context which this texture cache uses to create textures.

void om::graphics::gui::renderers::ImageTextureCache::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: