From 21a2cf6ff1f44ea752405ce5649dc7973e6aadfd Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Tue, 22 Jul 2014 16:35:28 +0000 Subject: [PATCH] Removed usage of _appliedProgramObjectSet as it's no longer used by OSG applications and was causing a threading crash. git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/branches/OpenSceneGraph-3.2@14379 16af8721-9629-0410-8352-f15c8da7e697 --- include/osg/State | 5 ----- src/osg/State.cpp | 35 ----------------------------------- 2 files changed, 40 deletions(-) diff --git a/include/osg/State b/include/osg/State index 2b82269fd..37d45192c 100644 --- a/include/osg/State +++ b/include/osg/State @@ -1336,11 +1336,6 @@ class OSG_EXPORT State : public Referenced, public Observer if (_lastAppliedProgramObject!=program) { _lastAppliedProgramObject = program; - if (program && _appliedProgramObjectSet.count(program)==0) - { - _appliedProgramObjectSet.insert(program); - program->addObserver(this); - } } } inline const Program::PerContextProgram* getLastAppliedProgramObject() const { return _lastAppliedProgramObject; } diff --git a/src/osg/State.cpp b/src/osg/State.cpp index 7e427f91e..529ec3c25 100644 --- a/src/osg/State.cpp +++ b/src/osg/State.cpp @@ -134,25 +134,10 @@ State::~State() //_texCoordArrayList.clear(); //_vertexAttribArrayList.clear(); - - // OSG_NOTICE<<"State::~State()"<removeObserver(this); - } } void State::objectDeleted(void* object) { - const Program::PerContextProgram* ppcp = reinterpret_cast(object); - AppliedProgramObjectSet::iterator itr = _appliedProgramObjectSet.find(ppcp); - if (itr != _appliedProgramObjectSet.end()) - { - // OSG_NOTICE<<"Removing _appliedProgramObjectSet entry "<resetAppliedUniforms(); - (*apitr)->removeObserver(this); - } - - _appliedProgramObjectSet.clear(); - - // what about uniforms??? need to clear them too... // go through all active Unfirom's, setting to change to force update, // the idea is to leave only the global defaults left. @@ -1716,15 +1690,6 @@ void State::print(std::ostream& fout) const } fout<<"}"<