Bug fixes to osgText to handle the osgUtil::Optimizer being used on a scene

graph containing text.

Fixed warning in MD2 plugin.
This commit is contained in:
Robert Osfield
2003-03-11 13:30:03 +00:00
parent 4cdbbf1b4a
commit 78de76f17f
14 changed files with 65 additions and 18 deletions

View File

@@ -59,6 +59,8 @@ class SG_EXPORT Image : public Object
virtual const char* libraryName() const { return "osg"; }
virtual const char* className() const { return "Image"; }
/** return -1 if *this < *rhs, 0 if *this==*rhs, 1 if *this>*rhs.*/
virtual int compare(const Image& rhs) const;
void setFileName(const std::string& fileName);
inline const std::string& getFileName() const { return _fileName; }

View File

@@ -23,7 +23,6 @@
#include <osgText/Export>
#include <string>
#include <set>
namespace osgText {
@@ -116,7 +115,6 @@ protected:
typedef std::pair< unsigned int, unsigned int > SizePair;
typedef std::map< SizePair, GlyphMap > SizeGlyphMap;
typedef std::set< Text* > TextList;
SizeGlyphMap _sizeGlyphMap;
GlyphTextureList _glyphTextureList;
@@ -175,6 +173,9 @@ public:
GlyphTexture();
/** return -1 if *this < *rhs, 0 if *this==*rhs, 1 if *this>*rhs.*/
virtual int compare(const StateAttribute& rhs) const;
void setStateSet(osg::StateSet* stateset) { _stateset = stateset; }
osg::StateSet* getStateSet() { return _stateset; }
const osg::StateSet* getStateSet() const { return _stateset; }