Hi,
I got the same problem, then I looked more closely to the source code. I made a
small change in osgUtil::SceneView.cpp (after line 1442, r13041) :
Code:
_renderStage->drawPreRenderStages(_renderInfo,previous);
/* FIX BEGIN */
osg::ColorMask* cmask2 = 0;
if(_secondaryStateSet.valid())
{
cmask2 =
static_cast<osg::ColorMask*>(_secondaryStateSet->getAttribute(osg::StateAttribute::COLORMASK));
}
if(!cmask2 && _globalStateSet.valid())
{
cmask2 =
static_cast<osg::ColorMask*>(_globalStateSet->getAttribute(osg::StateAttribute::COLORMASK));
}
if(cmask2)
{
cmask->setMask(cmask2->getRedMask(), cmask2->getGreenMask(),
cmask2->getBlueMask(),cmask2->getAlphaMask());
}
/* FIX END */
_renderStage->draw(_renderInfo,previous);
It seems that the camera color mask (from camera->getStateSet()) is set to the
_secondaryStateSet (if it is a slave camera) or _globalStateSet (if it is a
master camera) of the SceneView... see osgViewer::Renderer() constructor.
Cheers,
mat
------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=51179#51179
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org