Hi,
 
in r13604 osgUtils/SceneView got a new default value for SceneView::setDefaults():

Added SceneView::Options enum enetries APPLY_GLOBAL_DEFAULTS and CLEAR_GLOBAL_STATESET to control whether a _globalStateSet->clear() and _globalStateSet->setGlobalDefaults() should be called.

The problem seems to be that in osgViewer/Renderer.cpp those new enum values are not respected when sceneViewOptions for the scenes is calculated:

Renderer.cpp:399

unsigned int sceneViewOptions = osgUtil::SceneView::HEADLIGHT;
if (view)
{
    switch(view->getLightingMode())
    {
        case(osg::View::NO_LIGHT): sceneViewOptions = 0; break;
        case(osg::View::SKY_LIGHT): sceneViewOptions = osgUtil::SceneView::SKY_LIGHT; break;
        case(osg::View::HEADLIGHT): sceneViewOptions = osgUtil::SceneView::HEADLIGHT; break;
    }
}
...
_sceneView[0]->setDefaults(sceneViewOptions);
_sceneView[1]->setDefaults(sceneViewOptions);

 

This leads to a broken Scene in our application. As I've no idea about the internals of osg (I just searched this bug) I hope this is enough to fix the problem.

 

Thx,

Christian Ehrlicher

_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to