Equalizer  2.0.0
Parallel Rendering Framework
eq::util::BitmapFont Class Reference

A wrapper around AGL, WGL and GLX bitmap fonts. More...

#include <bitmapFont.h>

+ Collaboration diagram for eq::util::BitmapFont:

Public Member Functions

EQ_API BitmapFont (ObjectManager &gl, const void *key)
 Construct a new bitmap font. More...
EQ_API ~BitmapFont ()
 Destruct this bitmap font. More...
EQ_API bool init (const WindowSystem &ws, const std::string &name, const uint32_t size=12)
 Initialize this bitmap font. More...
EQ_API void exit ()
 De-initialize this bitmap font. More...
EQ_API void draw (const std::string &text) const
 Draw text on the current raster position. More...

Detailed Description

A wrapper around AGL, WGL and GLX bitmap fonts.

Definition at line 31 of file bitmapFont.h.

Constructor & Destructor Documentation

EQ_API eq::util::BitmapFont::BitmapFont ( ObjectManager gl,
const void *  key 

Construct a new bitmap font.

Usually bitmap fonts are allocated using ObjectManager::newEqBitmapFont, which provides the correct parameters for this constructor.

glAn ObjectManager to allocate display lists for the fonts
keyA unique key to allocate OpenGL objects from the object manager.
EQ_API eq::util::BitmapFont::~BitmapFont ( )

Destruct this bitmap font.

The destructor does not call exit, since it can't be sure there is a valid OpenGL context current.


Member Function Documentation

EQ_API void eq::util::BitmapFont::draw ( const std::string &  text) const

Draw text on the current raster position.

EQ_API void eq::util::BitmapFont::exit ( )

De-initialize this bitmap font.

EQ_API bool eq::util::BitmapFont::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.

wsthe current window system.
namethe name of the font.
sizethe size of the font in pixels.

The documentation for this class was generated from the following file: