From Ewe Woessner, "I looked at the Anaglyphic stereo implementation in SceneView.cpp and think I spotted some copy-paste bugs.

osg::ColorMask* leftColorMask = _renderStageLeft->getColorMask();
if (!leftColorMask)
{
   leftColorMask = new osg::ColorMask();
   _renderStageLeft->setColorMask(leftColorMask);
               ^^^^ here it said right, I think this should be Left.
}


// ensure that right eye color planes are active.
osg::ColorMask* rightColorMask = _renderStageRight->getColorMask();
                                             ^^^^ similar here, I think this should be right
if (!rightColorMask)
{
   rightColorMask = new osg::ColorMask();
   _renderStageRight->setColorMask(rightColorMask);
}

and i further removed an unnecessary setColorMask."
This commit is contained in:
Robert Osfield 2008-09-17 19:51:35 +00:00
parent cc079453da
commit 17161a9363

View File

@ -1067,7 +1067,7 @@ void SceneView::draw()
if (!leftColorMask)
{
leftColorMask = new osg::ColorMask();
_renderStageRight->setColorMask(leftColorMask);
_renderStageLeft->setColorMask(leftColorMask);
}
// red
@ -1084,7 +1084,7 @@ void SceneView::draw()
// ensure that right eye color planes are active.
osg::ColorMask* rightColorMask = _renderStageLeft->getColorMask();
osg::ColorMask* rightColorMask = _renderStageRight->getColorMask();
if (!rightColorMask)
{
rightColorMask = new osg::ColorMask();
@ -1098,7 +1098,6 @@ void SceneView::draw()
// rightColorMask->setMask(false,false,true,true);
_localStateSet->setAttribute(rightColorMask);
_renderStageRight->setColorMask(rightColorMask);
// draw right eye.
_renderStageRight->draw(_renderInfo,previous);