Equalizer
1.6.1
|
A wrapper around AGL, WGL and GLX bitmap fonts. More...
#include <bitmapFont.h>
Public Member Functions | |
BitmapFont (ObjectManager< OMT > &gl, const OMT &key) | |
Construct a new bitmap font. More... | |
~BitmapFont () | |
Destruct this bitmap font. More... | |
bool | init (const WindowSystem ws, const std::string &name, const uint32_t size=12) |
Initialize this bitmap font. More... | |
void | exit () |
De-initialize this bitmap font. More... | |
void | draw (const std::string &text) const |
Draw text on the current raster position. More... | |
A wrapper around AGL, WGL and GLX bitmap fonts.
Definition at line 216 of file eq/client/types.h.
eq::util::BitmapFont< class >::BitmapFont | ( | ObjectManager< OMT > & | gl, |
const OMT & | key | ||
) |
Construct a new bitmap font.
Usually bitmap fonts are allocated using ObjectManager::newEqBitmapFont, which provides the correct parameters for this constructor.
gl | An ObjectManager to allocate display lists for the fonts |
key | A unique key to allocate OpenGL objects from the object manager. |
eq::util::BitmapFont< class >::~BitmapFont | ( | ) |
Destruct this bitmap font.
The destructor does not call exit, since it can't be sure there is a valid OpenGL context current.
void eq::util::BitmapFont< class >::draw | ( | const std::string & | text | ) | const |
Draw text on the current raster position.
void eq::util::BitmapFont< class >::exit | ( | ) |
De-initialize this bitmap font.
bool eq::util::BitmapFont< class >::init | ( | const WindowSystem | ws, |
const std::string & | name, | ||
const uint32_t | size = 12 |
||
) |
Initialize this bitmap font.
The font name depends on the operating system. Please refer to your OS tools to find available fonts. If no name is given, "Times New Roman" or similar is used.
An OpenGL context needs to be current, and eq::XGetCurrentDisplay() needs to return the current display connection for GLX.
ws | the current window system. |
name | the name of the font. |
size | the size of the font in pixels. |