glttf::BitmapGlyph Class Reference

A bitmap font glyph. More...

#include <bitmapfont.h>

Inheritance diagram for glttf::BitmapGlyph:

glttf::Glyph List of all members.

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.

Detailed Description

A bitmap font glyph.

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.

Todo:
mipmapping
Todo:
monochrome rendering


Constructor & Destructor Documentation

glttf::BitmapGlyph::BitmapGlyph ( FT_GlyphSlot  glyph,
Parameter  param 
)

Create a new BitmapGlyph.

Parameters:
glyph the FreeType glyph which the glyph is built from
param unused


Member Function Documentation

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.

Returns:
true if non power of two textures are supported

static void glttf::BitmapGlyph::setupState (  )  [static]

Set up rendering state.

Enables GL_BLEND and GL_TEXTURE_2D.

See also:
Font::setupState()

static void glttf::BitmapGlyph::cleanupState (  )  [static]

Clean up rendering state.

Preserves the OpenGL state that was before calling to setupState()

See also:
Font::cleanupState(), setupState()


The documentation for this class was generated from the following file:
Generated on Mon Jan 8 12:08:37 2007 for GLttf by  doxygen 1.5.1