From 086efcdff10e8c963d3e205bdd80c8358dca6814 Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Thu, 14 Apr 2005 15:53:28 +0000 Subject: [PATCH] Removed setProgram from osg::StateSet as Program works just fine right now as a standard osg::StateAttribute and set in a StateSet with setAttribute. --- Make/openscenegraph.pc | 2 +- include/osg/StateSet | 12 ------------ src/osg/StateSet.cpp | 19 +------------------ 3 files changed, 2 insertions(+), 31 deletions(-) diff --git a/Make/openscenegraph.pc b/Make/openscenegraph.pc index eab6ccbb8..904995adb 100644 --- a/Make/openscenegraph.pc +++ b/Make/openscenegraph.pc @@ -10,5 +10,5 @@ Description: 3D scenegraph Version: 0.9,8 Requires: openthreads Conflicts: -Libs: -L${libdir} -losg -losgDB -losgFX -losgGA -losgGL2 -losgParticle -losgProducer -losgSim -losgText -losgUtil +Libs: -L${libdir} -losg -losgDB -losgFX -losgGA -losgParticle -losgProducer -losgSim -losgText -losgUtil Cflags: -I${includedir} diff --git a/include/osg/StateSet b/include/osg/StateSet index ca0eeff21..b9e065aed 100644 --- a/include/osg/StateSet +++ b/include/osg/StateSet @@ -295,17 +295,6 @@ class OSG_EXPORT StateSet : public Object /** return the const list of all Uniforms contained in this const StateSet.*/ inline const UniformList& getUniformList() const { return _uniformList; } - - void setProgram(Program* program) { _program = program; } - - Program* getProgram() { return _program.get(); } - - const Program* getProgram() const { return _program.get(); } - - - - - enum RenderingHint { DEFAULT_BIN = 0, @@ -385,7 +374,6 @@ class OSG_EXPORT StateSet : public Object TextureAttributeList _textureAttributeList; UniformList _uniformList; - osg::ref_ptr _program; inline ModeList& getOrCreateTextureModeList(unsigned int unit) { diff --git a/src/osg/StateSet.cpp b/src/osg/StateSet.cpp index 22ed850ad..45d24c7e0 100644 --- a/src/osg/StateSet.cpp +++ b/src/osg/StateSet.cpp @@ -124,9 +124,6 @@ StateSet::StateSet(const StateSet& rhs,const CopyOp& copyop):Object(rhs,copyop) Uniform* uni = copyop(rup.first.get()); if( uni ) _uniformList[name] = RefUniformPair(uni, rup.second); } - - Program* prog = copyop( rhs._program ); - if( prog ) _program = prog; #endif //] _renderingHint = rhs._renderingHint; @@ -312,19 +309,7 @@ int StateSet::compare(const StateSet& rhs,bool compareAttributeContents) const { if (rhs_uniform_itr!=rhs._uniformList.end()) return -1; } - else if (rhs_uniform_itr == rhs._uniformList.end()) return 1; - - if (_program.valid()) - { - if (rhs._program.valid()) - { - int result = _program->compare(*rhs._program); - if (result!=0) return result; - } - else return 1; - } - else if (rhs._program.valid()) return -1; - + else if (rhs_uniform_itr == rhs._uniformList.end()) return 1; return 0; } @@ -426,8 +411,6 @@ void StateSet::clear() _textureAttributeList.clear(); _uniformList.clear(); - _program = 0; - } void StateSet::merge(const StateSet& rhs)