#include <OGLFT.h>
Inheritance diagram for OGLFT::MonochromeTexture::
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) |
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 );
|
|
|
|
|
The monochrome texture destructor doesn't really do anything. |