Changed default cull mask to match the left cull mask so that mono rendering of presentations with left/right stereo images/movies works fine.

This commit is contained in:
Robert Osfield
2013-07-30 06:39:33 +00:00
parent fb8db6cb73
commit 52761f2c29

View File

@@ -491,10 +491,20 @@ int main( int argc, char **argv )
}
// set up stereo masks
viewer.getCamera()->setCullMask(0xffffffff);
viewer.getCamera()->setCullMaskLeft(0x00000001);
viewer.getCamera()->setCullMaskRight(0x00000002);
bool assignLeftCullMaskForMono = true;
if (assignLeftCullMaskForMono)
{
viewer.getCamera()->setCullMask(viewer.getCamera()->getCullMaskLeft());
}
else
{
viewer.getCamera()->setCullMask(0xffffffff);
}
// set up the camera manipulators.
{
osg::ref_ptr<osgGA::KeySwitchMatrixManipulator> keyswitchManipulator = new osgGA::KeySwitchMatrixManipulator;