Cutout Vis2012
TUWienVisualisierung2(SS2012)-AdaptiveCutaways
 All Classes Namespaces Functions Pages
Public Member Functions | List of all members
Text Class Reference

#include <FontRenderer.h>

Public Member Functions

 Text ()
 
void init (const std::string &text, FaceDescription *faceDescr, Scene *scene, Shader *shader)
 
virtual void render ()
 
void setPosition (int pX, int pY)
 
void setText (const std::string &text)
 
const std::string & getText () const
 

Detailed Description

Encapsulates GL state to draw a string in an orthographic projection.

See Also
FontRenderer

Constructor & Destructor Documentation

Text::Text ( )

To create a Text object, call the createText method in FontRenderer

Member Function Documentation

void Text::init ( const std::string &  text,
FaceDescription faceDescr,
Scene scene,
Shader shader 
)

Must be called before calling any other function.

Parameters
textstring to be drawn by the GL
faceDescrtrue type font that provides the character bitmaps
sceneactive scene that provides the canvas size
shadershader that is used for the draw call
void Text::render ( )
virtual

draws the specified string at the specified position

void Text::setPosition ( int  pX,
int  pY 
)

sets the pixel position of the string's bottom-left corner in window coordinates


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