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
This commit is contained in:
@@ -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; }
|
||||
|
||||
@@ -134,25 +134,10 @@ State::~State()
|
||||
//_texCoordArrayList.clear();
|
||||
|
||||
//_vertexAttribArrayList.clear();
|
||||
|
||||
// OSG_NOTICE<<"State::~State()"<<this<<std::endl;
|
||||
for(AppliedProgramObjectSet::iterator itr = _appliedProgramObjectSet.begin();
|
||||
itr != _appliedProgramObjectSet.end();
|
||||
++itr)
|
||||
{
|
||||
(*itr)->removeObserver(this);
|
||||
}
|
||||
}
|
||||
|
||||
void State::objectDeleted(void* object)
|
||||
{
|
||||
const Program::PerContextProgram* ppcp = reinterpret_cast<const Program::PerContextProgram*>(object);
|
||||
AppliedProgramObjectSet::iterator itr = _appliedProgramObjectSet.find(ppcp);
|
||||
if (itr != _appliedProgramObjectSet.end())
|
||||
{
|
||||
// OSG_NOTICE<<"Removing _appliedProgramObjectSet entry "<<ppcp<<std::endl;
|
||||
_appliedProgramObjectSet.erase(itr);
|
||||
}
|
||||
}
|
||||
|
||||
void State::reset()
|
||||
@@ -239,17 +224,6 @@ void State::reset()
|
||||
|
||||
_lastAppliedProgramObject = 0;
|
||||
|
||||
for(AppliedProgramObjectSet::iterator apitr=_appliedProgramObjectSet.begin();
|
||||
apitr!=_appliedProgramObjectSet.end();
|
||||
++apitr)
|
||||
{
|
||||
(*apitr)->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<<"}"<<std::endl;
|
||||
|
||||
#if 0
|
||||
TextureModeMapList _textureModeMapList;
|
||||
TextureAttributeMapList _textureAttributeMapList;
|
||||
|
||||
AppliedProgramObjectSet _appliedProgramObjectSet;
|
||||
const Program::PerContextProgram* _lastAppliedProgramObject;
|
||||
#endif
|
||||
|
||||
|
||||
fout<<"StateSetStack _stateSetStack {"<<std::endl;
|
||||
for(StateSetStack::const_iterator itr = _stateStateStack.begin();
|
||||
itr != _stateStateStack.end();
|
||||
|
||||
Reference in New Issue
Block a user