diff --git a/components/sceneutil/lightmanager.cpp b/components/sceneutil/lightmanager.cpp index c8d178152..3fc15afc0 100644 --- a/components/sceneutil/lightmanager.cpp +++ b/components/sceneutil/lightmanager.cpp @@ -294,6 +294,13 @@ namespace SceneUtil DisableLight(const DisableLight& copy,const osg::CopyOp& copyop=osg::CopyOp::SHALLOW_COPY) : osg::StateAttribute(copy,copyop), mIndex(copy.mIndex) {} + virtual osg::Object* cloneType() const { return new DisableLight(mIndex); } + virtual osg::Object* clone(const osg::CopyOp& copyop) const { return new DisableLight(*this,copyop); } + virtual bool isSameKindAs(const osg::Object* obj) const { return dynamic_cast(obj)!=NULL; } + virtual const char* libraryName() const { return "SceneUtil"; } + virtual const char* className() const { return "DisableLight"; } + virtual Type getType() const { return LIGHT; } + unsigned int getMember() const { return mIndex; @@ -310,8 +317,6 @@ namespace SceneUtil throw std::runtime_error("DisableLight::compare: unimplemented"); } - META_StateAttribute(SceneUtil, DisableLight, osg::StateAttribute::LIGHT) - virtual void apply(osg::State& state) const { int lightNum = GL_LIGHT0 + mIndex;