Bubba-3D  0.9.0
Awesome game engine!
Classes | Public Member Functions | Static Public Member Functions | Protected Member Functions | List of all members
FontManager Class Reference

#include <FontManager.h>

Public Member Functions

FontloadAndFetchFont (std::string fontFace, int pixelSize)
 
GLuint * getTex ()
 

Static Public Member Functions

static FontManagergetInstance ()
 

Protected Member Functions

virtual void loadFont (std::string fontFace, int pixelSize)
 

Detailed Description

Used to load and perform initialization on fonts

Definition at line 36 of file FontManager.h.

Member Function Documentation

FontManager * FontManager::getInstance ( )
static

Returns the singleton instance of the FontManager

Definition at line 64 of file FontManager.cpp.

GLuint * FontManager::getTex ( )

Returns the texture id used to store the font glyphs in.

Warning
The texture id might change when new fonts are loaded.
Exceptions
logic_errorIf the method is called before any fonts have been loaded.

Definition at line 40 of file FontManager.cpp.

Font * FontManager::loadAndFetchFont ( std::string  fontFace,
int  pixelSize 
)

If the font has been loaded before it is just returned. Otherwise the font is loaded and the characters are cached to the graphics card.

Warning
Never dereference the returned font or copy it as the font may change when other fonts are added.

Definition at line 74 of file FontManager.cpp.

void FontManager::loadFont ( std::string  fontFace,
int  pixelSize 
)
protectedvirtual

Loads a font and caches it to the graphics card

Definition at line 84 of file FontManager.cpp.


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