Form Richard Schmidt, "The following features were added:

* the glsl plugin now supports processing #includes. The file extension sets the shader type.

* the registry releases gl objects of the shared state manager
 "
This commit is contained in:
Robert Osfield
2010-12-13 12:16:57 +00:00
parent a345a04254
commit c665fdc973
4 changed files with 89 additions and 14 deletions

View File

@@ -283,3 +283,30 @@ void SharedStateManager::process(osg::StateSet* ss, osg::Object* parent)
shareTextures(ss);
}
}
void SharedStateManager::releaseGLObjects(osg::State* state) const
{
OpenThreads::ScopedLock<OpenThreads::Mutex> lock(_listMutex);
{
TextureSet::const_iterator it;
for ( it = _sharedTextureList.begin(); it != _sharedTextureList.end(); ++it )
{
if ( it->valid() )
{
it->get()->releaseGLObjects(state);
}
}
}
{
StateSetSet::const_iterator it;
for( it = _sharedStateSetList.begin(); it != _sharedStateSetList.end(); ++it )
{
if ( it->valid() )
{
it->get()->releaseGLObjects(state);
}
}
}
}