Public Member Functions | |
META_Node (osgPPU, UnitText) | |
UnitText () | |
Create default ppfx. | |
UnitText (const UnitText &, const osg::CopyOp ©op=osg::CopyOp::SHALLOW_COPY) | |
virtual | ~UnitText () |
Release it and used memory. | |
virtual void | init () |
Initialze the default postprocessing unit. | |
void | setSize (float size) |
Set size of the characters (relative to viewport.width / 640). | |
float | getSize () const |
void | setPosition (float x, float y) |
Set text position in 2D coordinates. | |
osg::Texture * | getOrCreateOutputTexture (int mrt=0) |
Text Unit does work as a simple bypass, hence return here always the input. | |
osgText::Text & | getText () |
Get text assigned with this unit. | |
const osgText::Text & | getText () const |
void | setText (const std::string &txt) |
Set string drawed by the text. | |
void | setText (osgText::Text *text) |
Set the text pointer used for the rendering. | |
Protected Member Functions | |
virtual bool | noticeBeginRendering (osg::RenderInfo &, const osg::Drawable *) |
Protected Attributes | |
osg::ref_ptr< osgText::Text > | mText |
Text class holder. | |
float | mSize |
Size of the font. |
The text is displayed in 2D ortho mode. This class is wrapper for the osgText::Text class, so check it for more information about the text support.
virtual bool osgPPU::UnitText::noticeBeginRendering | ( | osg::RenderInfo & | , | |
const osg::Drawable * | ||||
) | [protected, virtual] |
Here the FBO will be applied, so that Unit can render its output to attached textures. If you overwrite this method in derived class, so you have to take care about FBO handling.
Reimplemented from osgPPU::UnitInOut.
Copyright (C) 2008 by Art Tevs (LGPL)