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:
Robert Osfield
2014-07-22 16:02:33 +00:00
parent 3b23b474dc
commit 7dc3b34bfd
5 changed files with 3 additions and 58 deletions

View File

@@ -112,7 +112,7 @@ class VertexAttribAlias
* which typically stall the graphics pipeline (see, for instance,
* \c captureCurrentState() and \c getModelViewMatrix()).
*/
class OSG_EXPORT State : public Referenced, public Observer
class OSG_EXPORT State : public Referenced
{
public :
@@ -214,7 +214,6 @@ class OSG_EXPORT State : public Referenced, public Observer
/** reset the state object to an empty stack.*/
void reset();
inline const Viewport* getCurrentViewport() const
{
return static_cast<const Viewport*>(getLastAppliedAttribute(osg::StateAttribute::VIEWPORT));
@@ -1329,11 +1328,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; }
@@ -1463,8 +1457,6 @@ class OSG_EXPORT State : public Referenced, public Observer
/** Initialize extension used by osg:::State.*/
void initializeExtensionProcs();
virtual void objectDeleted(void* object);
/** Get the GL adapter object used to map OpenGL 1.0 glBegin/glEnd usage to vertex arrays.*/
inline GLBeginEndAdapter& getGLBeginEndAdapter() { return _glBeginEndAdapter; }
@@ -1574,8 +1566,6 @@ class OSG_EXPORT State : public Referenced, public Observer
typedef std::vector<ref_ptr<const Matrix> > MatrixStack;
typedef std::set<const Program::PerContextProgram* > AppliedProgramObjectSet;
inline const ModeMap& getModeMap() const {return _modeMap;};
inline const AttributeMap& getAttributeMap() const {return _attributeMap;};
inline const UniformMap& getUniformMap() const {return _uniformMap;};
@@ -1788,7 +1778,6 @@ class OSG_EXPORT State : public Referenced, public Observer
TextureModeMapList _textureModeMapList;
TextureAttributeMapList _textureAttributeMapList;
AppliedProgramObjectSet _appliedProgramObjectSet;
const Program::PerContextProgram* _lastAppliedProgramObject;
StateSetStack _stateStateStack;

View File

@@ -21,7 +21,7 @@ extern "C" {
#define OPENSCENEGRAPH_MAJOR_VERSION 3
#define OPENSCENEGRAPH_MINOR_VERSION 3
#define OPENSCENEGRAPH_PATCH_VERSION 3
#define OPENSCENEGRAPH_SOVERSION 113
#define OPENSCENEGRAPH_SOVERSION 114
/* Convenience macro that can be used to decide whether a feature is present or not i.e.
* #if OSG_MIN_VERSION_REQUIRED(2,9,5)