Classes | Public Member Functions | Private Member Functions | Private Attributes
vgui_font_textured Class Reference

vgui_font derived class that uses textured fonts. More...

#include <vgui_font_textured.h>

Inheritance diagram for vgui_font_textured:
Inheritance graph
[legend]

List of all members.

Classes

struct  texture_coord
 Type to store symbol location in texture. More...

Public Member Functions

 vgui_font_textured (const vcl_string &font_file)
 Constructor - from a font file (BMF font file only, for now).
virtual void draw (const vcl_string &str) const
 Draw a string of font symbols.
virtual void draw (const vcl_string &str, unsigned int size) const
 Draw a string of font symbols.
virtual ~vgui_font_textured ()
 Destructor.
void ref ()
void unref ()
int get_references () const
bool is_referenced () const

Private Member Functions

bool load_bmf_font (const vcl_string &font_file)
 Load font from BMF file.
void load_texture (const vil_image_view< GLubyte > &image)
 Load OpenGL texture for all symbols.
void create_display_lists ()
 Create OpenGL display list for each symbol.
void gl_draw (unsigned int i) const
 Draw symbol using OpenGL texture map primitives.

Private Attributes

texture_coord symbol_coords_ [256]
 256 symbol data.
GLuint display_list_base_id_
 Base display list identifier (i.e., for the first symbol).
GLuint texture_id_
 OpenGL texture identifier.

Detailed Description

vgui_font derived class that uses textured fonts.

Definition at line 21 of file vgui_font_textured.h.


Constructor & Destructor Documentation

vgui_font_textured::vgui_font_textured ( const vcl_string &  font_file)

Constructor - from a font file (BMF font file only, for now).

Definition at line 44 of file vgui_font_textured.cxx.

vgui_font_textured::~vgui_font_textured ( void  ) [virtual]

Destructor.

Definition at line 55 of file vgui_font_textured.cxx.


Member Function Documentation

void vgui_font_textured::create_display_lists ( void  ) [private]

Create OpenGL display list for each symbol.

Definition at line 240 of file vgui_font_textured.cxx.

void vgui_font_textured::draw ( const vcl_string &  str) const [virtual]

Draw a string of font symbols.

Implements vgui_font.

Definition at line 92 of file vgui_font_textured.cxx.

void vgui_font_textured::draw ( const vcl_string &  str,
unsigned int  size 
) const [virtual]

Draw a string of font symbols.

Reimplemented from vgui_font.

Definition at line 98 of file vgui_font_textured.cxx.

void vgui_font_textured::gl_draw ( unsigned int  i) const [private]

Draw symbol using OpenGL texture map primitives.

Draw font symbol.

Definition at line 62 of file vgui_font_textured.cxx.

bool vgui_font_textured::load_bmf_font ( const vcl_string &  font_file) [private]

Load font from BMF file.

Load font from file.

Definition at line 127 of file vgui_font_textured.cxx.

void vgui_font_textured::load_texture ( const vil_image_view< GLubyte > &  image) [private]

Load OpenGL texture for all symbols.

Definition at line 203 of file vgui_font_textured.cxx.


Member Data Documentation

Base display list identifier (i.e., for the first symbol).

Definition at line 68 of file vgui_font_textured.h.

256 symbol data.

Definition at line 65 of file vgui_font_textured.h.

OpenGL texture identifier.

Definition at line 71 of file vgui_font_textured.h.


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