diff --git a/components/sceneutil/lightmanager.cpp b/components/sceneutil/lightmanager.cpp index c03bbca597..1735f6b8b3 100644 --- a/components/sceneutil/lightmanager.cpp +++ b/components/sceneutil/lightmanager.cpp @@ -400,7 +400,7 @@ namespace SceneUtil class LightStateAttributePerObjectUniform : public osg::StateAttribute { public: - LightStateAttributePerObjectUniform() {} + LightStateAttributePerObjectUniform() : mLightManager(nullptr) {} LightStateAttributePerObjectUniform(const std::vector>& lights, LightManager* lightManager) : mLights(lights), mLightManager(lightManager) {} LightStateAttributePerObjectUniform(const LightStateAttributePerObjectUniform& copy,const osg::CopyOp& copyop=osg::CopyOp::SHALLOW_COPY) @@ -613,7 +613,7 @@ namespace SceneUtil class LightManagerCullCallback : public osg::NodeCallback { public: - LightManagerCullCallback(LightManager* lightManager) : mLightManager(lightManager) {} + LightManagerCullCallback(LightManager* lightManager) : mLightManager(lightManager), mLastFrameNumber(0) {} void operator()(osg::Node* node, osg::NodeVisitor* nv) override { @@ -903,6 +903,10 @@ namespace SceneUtil , mLightingMask(copy.mLightingMask) , mSun(copy.mSun) , mLightingMethod(copy.mLightingMethod) + , mPointLightRadiusMultiplier(copy.mPointLightRadiusMultiplier) + , mPointLightFadeEnd(copy.mPointLightFadeEnd) + , mPointLightFadeStart(copy.mPointLightFadeStart) + , mMaxLights(copy.mMaxLights) { }