Cutout Vis2012
TUWienVisualisierung2(SS2012)-AdaptiveCutaways
|
#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 |
Encapsulates GL state to draw a string in an orthographic projection.
Text::Text | ( | ) |
To create a Text object, call the createText
method in FontRenderer
void Text::init | ( | const std::string & | text, |
FaceDescription * | faceDescr, | ||
Scene * | scene, | ||
Shader * | shader | ||
) |
Must be called before calling any other function.
text | string to be drawn by the GL |
faceDescr | true type font that provides the character bitmaps |
scene | active scene that provides the canvas size |
shader | shader that is used for the draw call |
|
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