Main Page | Class Hierarchy | Class List | File List | Class Members | File Members

OpenGLFont Class Reference

#include <OpenGLFont.h>

List of all members.

Public Member Functions

 OpenGLFont ()
 OpenGLFont (HFONT font, OpenGLRenderer *renderer, HDC hDC)
 ~OpenGLFont ()
bool init (HFONT font, HDC hDC)
void startTextMode ()
void endTextMode ()
void setColor (float r, float g, float b, float a)
void setColor (Vec4 c)
void print (float x, float y, const char *str,...)

Private Attributes

OpenGLRendererm_renderer
GLuint m_startTextModeList
GLuint m_textBase
float r
float g
float b
float a


Detailed Description

OpenGLFont.h

Author: Petter Alstermark, petter@alstermark.com

Definition at line 13 of file OpenGLFont.h.


Constructor & Destructor Documentation

OpenGLFont::OpenGLFont  ) 
 

OpenGLFont.cpp

Author: Petter Alstermark, petter@alstermark.com

Definition at line 9 of file OpenGLFont.cpp.

References m_renderer, m_startTextModeList, and m_textBase.

OpenGLFont::OpenGLFont HFONT  font,
OpenGLRenderer renderer,
HDC  hDC
 

Definition at line 16 of file OpenGLFont.cpp.

References init(), m_renderer, m_startTextModeList, and m_textBase.

Here is the call graph for this function:

OpenGLFont::~OpenGLFont  ) 
 

Definition at line 25 of file OpenGLFont.cpp.

References LOG_SUCCESS, m_renderer, m_startTextModeList, and m_textBase.


Member Function Documentation

void OpenGLFont::endTextMode  ) 
 

Definition at line 135 of file OpenGLFont.cpp.

Referenced by OpenGLConsole::draw(), Menu::drawCreate(), Menu::drawCredits(), Scores::drawFrame(), Play::drawFrame(), MainApp::drawFrame(), Join::drawFrame(), Menu::drawJoin(), and MainApp::drawLoading().

bool OpenGLFont::init HFONT  font,
HDC  hDC
 

font = CreateFont( -12, // height 0, // default width, 0, 0, // angles FW_BOLD, // bold false, // italic false, // underline false, // strikeout ANSI_CHARSET, // character set OUT_TT_PRECIS, // ouput precision CLIP_DEFAULT_PRECIS, // clipping precision ANTIALIASED_QUALITY, // quality FF_DONTCARE | DEFAULT_PITCH, // family and pitch fontName); // font name

Definition at line 34 of file OpenGLFont.cpp.

References a, b, g, LOG_SUCCESS, m_textBase, and r.

Referenced by OpenGLFont().

void OpenGLFont::print float  x,
float  y,
const char str,
  ...
 

Definition at line 113 of file OpenGLFont.cpp.

References a, b, g, m_textBase, and r.

Referenced by OpenGLConsole::draw(), Menu::drawCreate(), Menu::drawCredits(), Scores::drawFrame(), Play::drawFrame(), MainApp::drawFrame(), Join::drawFrame(), Menu::drawJoin(), and MainApp::drawLoading().

void OpenGLFont::setColor Vec4  c  )  [inline]
 

Definition at line 22 of file OpenGLFont.h.

References Vec4::w, Vec4::x, Vec4::y, and Vec4::z.

void OpenGLFont::setColor float  r,
float  g,
float  b,
float  a
 

Definition at line 106 of file OpenGLFont.cpp.

References a, b, g, and r.

Referenced by OpenGLConsole::draw(), Menu::drawCreate(), Menu::drawCredits(), Scores::drawFrame(), Play::drawFrame(), MainApp::drawFrame(), Join::drawFrame(), Menu::drawJoin(), and MainApp::drawLoading().

void OpenGLFont::startTextMode  ) 
 

Definition at line 73 of file OpenGLFont.cpp.

References Renderer::apply(), DEPTH_NONE, g_height, g_width, m_renderer, m_startTextModeList, m_textBase, ONE, Renderer::setBlending(), Renderer::setDepthFunc(), and SRC_ALPHA.

Referenced by OpenGLConsole::draw(), Menu::drawCreate(), Menu::drawCredits(), Scores::drawFrame(), Play::drawFrame(), MainApp::drawFrame(), Join::drawFrame(), Menu::drawJoin(), and MainApp::drawLoading().

Here is the call graph for this function:


Member Data Documentation

float OpenGLFont::a [private]
 

Definition at line 30 of file OpenGLFont.h.

Referenced by init(), print(), and setColor().

float OpenGLFont::b [private]
 

Definition at line 30 of file OpenGLFont.h.

Referenced by init(), print(), and setColor().

float OpenGLFont::g [private]
 

Definition at line 30 of file OpenGLFont.h.

Referenced by init(), print(), and setColor().

OpenGLRenderer* OpenGLFont::m_renderer [private]
 

Definition at line 26 of file OpenGLFont.h.

Referenced by OpenGLFont(), startTextMode(), and ~OpenGLFont().

GLuint OpenGLFont::m_startTextModeList [private]
 

Definition at line 27 of file OpenGLFont.h.

Referenced by OpenGLFont(), startTextMode(), and ~OpenGLFont().

GLuint OpenGLFont::m_textBase [private]
 

Definition at line 28 of file OpenGLFont.h.

Referenced by init(), OpenGLFont(), print(), startTextMode(), and ~OpenGLFont().

float OpenGLFont::r [private]
 

Definition at line 30 of file OpenGLFont.h.

Referenced by init(), print(), and setColor().


Generated on Sun Jun 5 15:50:31 2005 for Defacto by  doxygen 1.4.3