Removed setProgram from osg::StateSet as Program works just fine right now
as a standard osg::StateAttribute and set in a StateSet with setAttribute.
This commit is contained in:
@@ -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}
|
||||
|
||||
@@ -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<osg::Program> _program;
|
||||
|
||||
inline ModeList& getOrCreateTextureModeList(unsigned int unit)
|
||||
{
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user