HI Nickolai, If you don't want the default global light then simple do:
viewer.setLightingMode(osg::Viewer::NO_LIGHT); Rather than switching it to SKY_LIGHT! Robert. On 5 June 2016 at 22:44, Nickolai Medvedev <[email protected]> wrote: > Well, we can deceive viewer if we make so: > > > Code: > viewer.getLight()->setAmbient(osg::Vec4(0.0,0.0,0.0,1.0)); > viewer.getLight()->setPosition(osg::Vec4(0.0,0.0,0.0,1.0)); > viewer.getLight()->setDiffuse(osg::Vec4(0.0,0.0,0.0,1.0)); > viewer.getLight()->setConstantAttenuation(0.003); > viewer.getLight()->setLinearAttenuation(0.1); > viewer.getLight()->setQuadraticAttenuation(0.1); > viewer.getLight()->setName("global_light"); > viewer.getLight()->setLightNum(0); > > viewer.setLightingMode(osg::View::SKY_LIGHT); > > > > The light source still be exist, but will be invisible. > > Cheers, > Nickolai > > ------------------ > Read this topic online here: > http://forum.openscenegraph.org/viewtopic.php?p=67426#67426 > > > > > > _______________________________________________ > osg-users mailing list > [email protected] > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org _______________________________________________ osg-users mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

