|
|
|
@ -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)
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|