#include <bitmapfont.h>
Inheritance diagram for glttf::BitmapGlyph:
Public Types | |
typedef unsigned char | Parameter |
The parameter type of BitmapFonts. | |
Public Member Functions | |
BitmapGlyph (FT_GlyphSlot glyph, Parameter param) | |
Create a new BitmapGlyph. | |
Static Public Member Functions | |
static bool | NPOTSupported () |
Check for non power of two texture support. | |
static void | setupState () |
Set up rendering state. | |
static void | cleanupState () |
Clean up rendering state. | |
Static Public Attributes | |
static const Parameter | DEFAULT_PARAMETER = 0 |
The default parameter for this font. |
The bitmap font class renders the invidual glyphs into separate textures and draws quads textured with the appropriate texture.
The textures are in GL_ALPHA
format. GL_BLEND
is implicitly turned on by setupState. glBlendFunc
is not set by this class.
If non power of two textures are available (ie. GL_ARB_texture_non_power_of_two)
the glyphs are stored in non power of two sized textures, otherwise the textures will be the smallest power of two size available.
glttf::BitmapGlyph::BitmapGlyph | ( | FT_GlyphSlot | glyph, | |
Parameter | param | |||
) |
Create a new BitmapGlyph.
glyph | the FreeType glyph which the glyph is built from | |
param | unused |
static bool glttf::BitmapGlyph::NPOTSupported | ( | ) | [static] |
Check for non power of two texture support.
Check if GL_ARB_texture_non_power_of_two
extension is supported and cache the result for subsequent calls to this function.
true
if non power of two textures are supported static void glttf::BitmapGlyph::setupState | ( | ) | [static] |
static void glttf::BitmapGlyph::cleanupState | ( | ) | [static] |
Clean up rendering state.
Preserves the OpenGL state that was before calling to setupState()