mirror of
https://github.com/OpenMW/openmw.git
synced 2025-01-16 15:29:55 +00:00
Fix uninitialized variables in the LightManager
This commit is contained in:
parent
e309f75938
commit
bce6effe95
1 changed files with 6 additions and 2 deletions
|
@ -400,7 +400,7 @@ namespace SceneUtil
|
|||
class LightStateAttributePerObjectUniform : public osg::StateAttribute
|
||||
{
|
||||
public:
|
||||
LightStateAttributePerObjectUniform() {}
|
||||
LightStateAttributePerObjectUniform() : mLightManager(nullptr) {}
|
||||
LightStateAttributePerObjectUniform(const std::vector<osg::ref_ptr<osg::Light>>& 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)
|
||||
{
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue