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
|
||||
|
@ -499,6 +499,8 @@ osg::Matrixd SceneView::computeRightEyeViewImplementation(const osg::Matrixd& vi
|
||||
void SceneView::inheritCullSettings(const osg::CullSettings& settings, unsigned int inheritanceMask)
|
||||
{
|
||||
if (_camera.valid() && _camera->getView())
|
||||
{
|
||||
if (inheritanceMask & osg::CullSettings::LIGHTING_MODE)
|
||||
{
|
||||
switch(_camera->getView()->getLightingMode())
|
||||
{
|
||||
@ -506,9 +508,13 @@ void SceneView::inheritCullSettings(const osg::CullSettings& settings, unsigned
|
||||
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());
|
||||
}
|
||||
}
|
||||
|
||||
osg::CullSettings::inheritCullSettings(settings, inheritanceMask);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user