Public Member Functions | |
GlyphTexture () | |
const char * | className () const |
Return the name of the attribute's class type. | |
virtual int | compare (const osg::StateAttribute &rhs) const |
return -1 if *this < *rhs, 0 if *this==*rhs, 1 if *this>*rhs. | |
void | setGlyphImageMargin (unsigned int margin) |
Set the margin around each glyph, to ensure that texture filtering doesn't bleed adjacent glyph's into each other. | |
unsigned int | getGlyphImageMargin () const |
void | setGlyphImageMarginRatio (float margin) |
float | getGlyphImageMarginRatio () const |
bool | getSpaceForGlyph (Glyph *glyph, int &posX, int &posY) |
void | addGlyph (Glyph *glyph, int posX, int posY) |
virtual void | apply (osg::State &state) const |
Bind the texture object. | |
virtual void | setThreadSafeRefUnref (bool threadSafe) |
Set whether to use a mutex to ensure ref() and unref() are thread safe. | |
virtual void | resizeGLObjectBuffers (unsigned int maxSize) |
Resize any per context GLObject buffers to specified size. | |
Protected Types | |
typedef std::vector < osg::ref_ptr < Glyph > > | GlyphRefList |
typedef std::vector < const Glyph * > | GlyphPtrList |
typedef osg::buffered_object < GlyphPtrList > | GlyphBuffer |
Protected Member Functions | |
virtual | ~GlyphTexture () |
Protected Attributes | |
int | _margin |
float | _marginRatio |
int | _usedY |
int | _partUsedX |
int | _partUsedY |
GlyphRefList | _glyphs |
GlyphBuffer | _glyphsToSubload |
OpenThreads::Mutex | _mutex |
typedef std::vector< osg::ref_ptr<Glyph> > osgText::Font::GlyphTexture::GlyphRefList [protected] |
typedef std::vector< const Glyph* > osgText::Font::GlyphTexture::GlyphPtrList [protected] |
typedef osg::buffered_object< GlyphPtrList > osgText::Font::GlyphTexture::GlyphBuffer [protected] |
osgText::Font::GlyphTexture::GlyphTexture | ( | ) |
virtual osgText::Font::GlyphTexture::~GlyphTexture | ( | ) | [protected, virtual] |
const char* osgText::Font::GlyphTexture::className | ( | ) | const [inline, virtual] |
virtual int osgText::Font::GlyphTexture::compare | ( | const osg::StateAttribute & | rhs | ) | const [virtual] |
void osgText::Font::GlyphTexture::setGlyphImageMargin | ( | unsigned int | margin | ) | [inline] |
Set the margin around each glyph, to ensure that texture filtering doesn't bleed adjacent glyph's into each other.
unsigned int osgText::Font::GlyphTexture::getGlyphImageMargin | ( | ) | const [inline] |
void osgText::Font::GlyphTexture::setGlyphImageMarginRatio | ( | float | margin | ) | [inline] |
float osgText::Font::GlyphTexture::getGlyphImageMarginRatio | ( | ) | const [inline] |
bool osgText::Font::GlyphTexture::getSpaceForGlyph | ( | Glyph * | glyph, | |
int & | posX, | |||
int & | posY | |||
) |
void osgText::Font::GlyphTexture::addGlyph | ( | Glyph * | glyph, | |
int | posX, | |||
int | posY | |||
) |
virtual void osgText::Font::GlyphTexture::apply | ( | osg::State & | state | ) | const [virtual] |
Bind the texture object.
If the texture object hasn't already been compiled, create the texture mipmap levels.
Reimplemented from osg::Texture2D.
virtual void osgText::Font::GlyphTexture::setThreadSafeRefUnref | ( | bool | threadSafe | ) | [virtual] |
Set whether to use a mutex to ensure ref() and unref() are thread safe.
Reimplemented from osg::Referenced.
virtual void osgText::Font::GlyphTexture::resizeGLObjectBuffers | ( | unsigned int | maxSize | ) | [virtual] |
int osgText::Font::GlyphTexture::_margin [protected] |
float osgText::Font::GlyphTexture::_marginRatio [protected] |
int osgText::Font::GlyphTexture::_usedY [protected] |
int osgText::Font::GlyphTexture::_partUsedX [protected] |
int osgText::Font::GlyphTexture::_partUsedY [protected] |
GlyphRefList osgText::Font::GlyphTexture::_glyphs [protected] |
GlyphBuffer osgText::Font::GlyphTexture::_glyphsToSubload [mutable, protected] |
OpenThreads::Mutex osgText::Font::GlyphTexture::_mutex [mutable, protected] |