Removed State::AppliedProgramObjectSet container and Obsever usage from osg::State to address threading bug crash.
The State::AppliedProgramObjectSet wasn't ever being used actively in the current rev of the OSG so populating and clearing was no longer neccessary, allowing the code to be removed completely. git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14377 16af8721-9629-0410-8352-f15c8da7e697
This commit is contained in:
@@ -134,28 +134,8 @@ 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::releaseGLObjects()
|
||||
{
|
||||
// release any GL objects held by the shader composer
|
||||
@@ -208,7 +188,6 @@ void State::releaseGLObjects()
|
||||
|
||||
void State::reset()
|
||||
{
|
||||
|
||||
#if 1
|
||||
for(ModeMap::iterator mitr=_modeMap.begin();
|
||||
mitr!=_modeMap.end();
|
||||
@@ -290,17 +269,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.
|
||||
@@ -1767,14 +1735,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();
|
||||
|
||||
Reference in New Issue
Block a user