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:
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user