From Farshid Lashkari, "Here is the patch we discussed previously about adding a flag to

CullSettings which allows CameraNode to inherit the clear color."
This commit is contained in:
Robert Osfield 2006-10-02 14:11:40 +00:00
parent eb68735ff9
commit f97759405a
2 changed files with 9 additions and 1 deletions

View File

@ -70,6 +70,7 @@ class OSG_EXPORT CullSettings
CULL_MASK = 0x0400, CULL_MASK = 0x0400,
CULL_MASK_LEFT = 0x0800, CULL_MASK_LEFT = 0x0800,
CULL_MASK_RIGHT = 0x1000, CULL_MASK_RIGHT = 0x1000,
CLEAR_COLOR = 0x2000,
NO_VARIABLES = 0x0000, NO_VARIABLES = 0x0000,
ALL_VARIABLES = 0xFFFF ALL_VARIABLES = 0xFFFF

View File

@ -1151,7 +1151,14 @@ void CullVisitor::apply(osg::CameraNode& camera)
// set up the background color and clear mask. // set up the background color and clear mask.
rtts->setClearColor(camera.getClearColor()); if (camera.getInheritanceMask() & CLEAR_COLOR)
{
rtts->setClearColor(camera.getClearColor());
}
else
{
rtts->setClearColor(previous_stage->getClearColor());
}
rtts->setClearMask(camera.getClearMask()); rtts->setClearMask(camera.getClearMask());
// set the color mask. // set the color mask.