openscenegraph
Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes
osgText::GlyphTexture Class Reference
Inheritance diagram for osgText::GlyphTexture:
osg::Texture2D osg::Texture osg::StateAttribute osg::Object osg::Referenced

List of all members.

Public Member Functions

 GlyphTexture ()
const char * className () const
virtual int compare (const osg::StateAttribute &rhs) const
void setGlyphImageMargin (unsigned int margin)
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
virtual void setThreadSafeRefUnref (bool threadSafe)
virtual void resizeGLObjectBuffers (unsigned int maxSize)
osg::ImagecreateImage ()

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

Member Typedef Documentation

typedef std::vector< const Glyph* > osgText::GlyphTexture::GlyphPtrList [protected]
typedef std::vector< osg::ref_ptr<Glyph> > osgText::GlyphTexture::GlyphRefList [protected]

Constructor & Destructor Documentation

virtual osgText::GlyphTexture::~GlyphTexture ( ) [protected, virtual]

Member Function Documentation

void osgText::GlyphTexture::addGlyph ( Glyph glyph,
int  posX,
int  posY 
)
virtual void osgText::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.

const char* osgText::GlyphTexture::className ( ) const [inline, virtual]

Return the name of the attribute's class type.

Reimplemented from osg::Texture.

virtual int osgText::GlyphTexture::compare ( const osg::StateAttribute rhs) const [virtual]

return -1 if *this < *rhs, 0 if *this==*rhs, 1 if *this>*rhs.

Reimplemented from osg::Texture2D.

create an image that maps all the associated Glyph's onto a single image, that is equivilant to what will be downloaded to the texture.

unsigned int osgText::GlyphTexture::getGlyphImageMargin ( ) const [inline]
bool osgText::GlyphTexture::getSpaceForGlyph ( Glyph glyph,
int &  posX,
int &  posY 
)
virtual void osgText::GlyphTexture::resizeGLObjectBuffers ( unsigned int  maxSize) [virtual]

Resize any per context GLObject buffers to specified size.

Reimplemented from osg::Texture.

void osgText::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.

void osgText::GlyphTexture::setGlyphImageMarginRatio ( float  margin) [inline]
virtual void osgText::GlyphTexture::setThreadSafeRefUnref ( bool  threadSafe) [virtual]

Set whether to use a mutex to ensure ref() and unref() are thread safe.

Reimplemented from osg::Object.


Member Data Documentation


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