GL Studio Safety Critical Embedded C++ Runtime Library
|
#include <gls_font_base.h>
Classes | |
struct | FontAttributes |
struct | GlyphAttribute |
struct | InitParameters |
struct | RenderAttributes |
Public Types | |
typedef GlsUInt32 | CharCode |
Public Member Functions | |
void | BindFontTexture (GlsStateManager &gl) const |
void | RenderString (GlsStateManager &gl, const GlsChar *const str, const GlsUInt32 numChars, const RenderAttributes &renderAttributes) const |
const FontAttributes & | GetFontAttributes (void) const |
const GlyphAttribute & | GetGlyphAttribute (const GlsChar c, const GlsBool uppercase) const |
Static Public Attributes | |
static const GlsChar | TAB_CHAR |
Protected Member Functions | |
GlsFontBase (const InitParameters &initParameters) | |
void | DrawMappedQuad (const GlsVector2D &p1, const GlsVector2D &p2, const GlsVector2D &t1, const GlsVector2D &t2) const |
virtual | ~GlsFontBase () |
Protected Attributes | |
const FontAttributes | _fontAttributes |
const GlsUInt32 | _numGlyphAttributes |
GlyphAttribute *const | _glyphAttributes |
const GlsImage *const | _fontImage |
This class serves as the base class for all fonts
typedef GlsUInt32 GlsFontBase::CharCode |
code associated with a character in the font
|
protected |
Constructor - called by derived font classes
initParameters | initialization parameters |
|
protectedvirtual |
Destructor - shall never be called
void GlsFontBase::BindFontTexture | ( | GlsStateManager & | gl | ) | const |
Initializes the font to begin rendering characters. This will bind the font's texture. This must be called once before invoking RenderString to draw characters.
gl | state manager for OpenGL |
|
protected |
Issue the GL vertex and texture coordinates for the quad described by the given points and texture coordinates
p1 | first corner of quad |
p2 | opposite corner of quad |
t1 | texture coord for first corner |
t2 | texture coord for opposite corner |
const FontAttributes& GlsFontBase::GetFontAttributes | ( | void | ) | const |
Get the font attributes for this font
const GlyphAttribute& GlsFontBase::GetGlyphAttribute | ( | const GlsChar | c, |
const GlsBool | uppercase | ||
) | const |
Get the glyph attributes for a given char
c | char in question |
uppercase | GLS_TRUE to use uppercase version of char else GLS_FALSE |
void GlsFontBase::RenderString | ( | GlsStateManager & | gl, |
const GlsChar *const | str, | ||
const GlsUInt32 | numChars, | ||
const RenderAttributes & | renderAttributes | ||
) | const |
Renders the specified character string with the given render attributes.
gl | State Manager for OpenGL where character will be drawn |
str | string to render ( must contain at least numChars characters ) |
numChars | number of characters in str to render (>0) |
renderAttributes | desired render attributes for character |
|
protected |
font attributes
|
protected |
font texture
|
protected |
array of glyph attributes
|
protected |
number of glyph attribues in glyphAttributes array
|
static |
tab character constant