Main Page   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members  

OGLFT::MonochromeTexture Class Reference

Render text as texture mapped monochrome quads. More...

#include <OGLFT.h>

Inheritance diagram for OGLFT::MonochromeTexture::

OGLFT::Texture OGLFT::Face List of all members.

Public Methods

 MonochromeTexture (const char *filename, float point_size=12, FT_UInt resolution=100)
 MonochromeTexture (FT_Face face, float point_size=12, FT_UInt resolution=100)
 ~MonochromeTexture (void)

Detailed Description

Render text as texture mapped monochrome quads.

texture_monochrome_class.png
This style is similar to the Monochrome raster style, except instead of using glBitmap to draw the raster image, the image is used as a texture map on a quad. If drawing is confined to the Z plane, then you will see no difference between this style and Monochrome. However, because the quad is a 3D object, it can be transformed by the usual modeling operations; so, texture mapped glyphs can be rotated in the X and Y directions as well as Z direction. Also, if the viewing (or modeling) transformation has a non-unity scale or shear, the glyphs will also be scaled or sheared (unlike the raster styles). Also, there is no problem with clipping glyphs which lie off the screen; texture mapped quads are properly clipped to the screen boundary.

If this is not convincing enough, the performance of texture mapped glyphs is generally as good as or better than the equivalent raster style (especially with hardware texture acceleration). However, they do take up more memory space.

Note: you must call

 glPixelStorei( GL_UNPACK_ALIGNMENT, 1 );
before drawing in order for textured glyphs to be rendered properly.


Constructor & Destructor Documentation

OGLFT::MonochromeTexture::MonochromeTexture ( const char * filename,
float point_size = 12,
FT_UInt resolution = 100 )
 

Parameters:
file   the filename which contains the font face.
point_size   the initial point size of the font to generate. A point is essentially 1/72th of an inch. Defaults to 12.
resolution   the pixel density of the display in dots per inch (DPI). Defaults to 100 DPI.

OGLFT::MonochromeTexture::MonochromeTexture ( FT_Face face,
float point_size = 12,
FT_UInt resolution = 100 )
 

Parameters:
face   open FreeType FT_Face
point_size   the initial point size of the font to generate. A point is essentially 1/72th of an inch. Defaults to 12.
resolution   the pixel density of the display in dots per inch (DPI). Defaults to 100 DPI.

OGLFT::MonochromeTexture::~MonochromeTexture ( void )
 

The monochrome texture destructor doesn't really do anything.


The documentation for this class was generated from the following files:
Generated at Fri Jul 12 10:47:15 2002 for OGLFT by doxygen1.2.8.1 written by Dimitri van Heesch, © 1997-2001