Added CullSettings inheritance mask for LIGHTING_MODE and LIGHT
This commit is contained in:
parent
963cd837e3
commit
5b9883516a
@ -71,6 +71,8 @@ class OSG_EXPORT CullSettings
|
||||
CULL_MASK_LEFT = 0x0800,
|
||||
CULL_MASK_RIGHT = 0x1000,
|
||||
CLEAR_COLOR = 0x2000,
|
||||
LIGHTING_MODE = 0x4000,
|
||||
LIGHT = 0x8000,
|
||||
|
||||
NO_VARIABLES = 0x0000,
|
||||
ALL_VARIABLES = 0xFFFF
|
||||
|
@ -500,14 +500,20 @@ void SceneView::inheritCullSettings(const osg::CullSettings& settings, unsigned
|
||||
{
|
||||
if (_camera.valid() && _camera->getView())
|
||||
{
|
||||
switch(_camera->getView()->getLightingMode())
|
||||
if (inheritanceMask & osg::CullSettings::LIGHTING_MODE)
|
||||
{
|
||||
case(osg::View::NO_LIGHT): setLightingMode(NO_SCENEVIEW_LIGHT); break;
|
||||
case(osg::View::HEADLIGHT): setLightingMode(HEADLIGHT); break;
|
||||
case(osg::View::SKY_LIGHT): setLightingMode(SKY_LIGHT); break;
|
||||
switch(_camera->getView()->getLightingMode())
|
||||
{
|
||||
case(osg::View::NO_LIGHT): setLightingMode(NO_SCENEVIEW_LIGHT); break;
|
||||
case(osg::View::HEADLIGHT): setLightingMode(HEADLIGHT); break;
|
||||
case(osg::View::SKY_LIGHT): setLightingMode(SKY_LIGHT); break;
|
||||
}
|
||||
}
|
||||
|
||||
if (inheritanceMask & osg::CullSettings::LIGHT)
|
||||
{
|
||||
setLight(_camera->getView()->getLight());
|
||||
}
|
||||
|
||||
setLight(_camera->getView()->getLight());
|
||||
}
|
||||
|
||||
osg::CullSettings::inheritCullSettings(settings, inheritanceMask);
|
||||
|
Loading…
Reference in New Issue
Block a user