Change the DefaultFont so that it's managemed via the ObjectCache to enabl it to be release and cleared in a central manner.

Added call to Registry::releaseGLObjects() to osgViewer/Renderer.cpp to enable automatic clean up of objects in the ObjectCache.
This commit is contained in:
Robert Osfield
2019-07-25 14:10:01 +01:00
parent e6f6de640a
commit 24d61c2df0
4 changed files with 19 additions and 4 deletions

View File

@@ -83,7 +83,7 @@ public:
virtual std::string getFileName() const;
static osg::ref_ptr<Font>& getDefaultFont();
static osg::ref_ptr<Font> getDefaultFont();
typedef std::vector< osg::ref_ptr<osg::StateSet> > StateSets;
StateSets& getCachedStateSets() { return _statesets; }