just an FYI, that does not turn the light off, its still on and you paying the cost of it being applied to all the geom in the scene attached to that view
Gordon __________________________________________________________ Gordon Tomlinson Product Manager 3D Email : gtomlinson @ overwatch.textron.com __________________________________________________________ (C): (+1) 571-265-2612 (W): (+1) 703-437-7651 "Self defence is not a function of learning tricks but is a function of how quickly and intensely one can arouse one's instinct for survival" - Master Tambo Tetsura ________________________________ From: [email protected] [mailto:[email protected]] On Behalf Of Ben Axelrod Sent: Tuesday, February 17, 2009 3:09 PM To: OpenSceneGraph Users Subject: Re: [osg-users] osg::View NO_LIGHT bug? I still don't know why osg::View::NO_LIGHT doesn't work, but to answer my own questions, to turn off the default light completely: _viewer->getCamera()->getView()->setLightingMode(osg::View::HEADLIGHT); osg::Light* light = _viewer->getCamera()->getView()->getLight(); if (light != NULL) { light->setAmbient(osg::Vec4(0,0,0,1)); light->setDiffuse(osg::Vec4(0,0,0,1)); light->setSpecular(osg::Vec4(0,0,0,1)); } -Ben ________________________________ From: [email protected] [mailto:[email protected]] On Behalf Of Ben Axelrod Sent: Tuesday, February 17, 2009 11:36 AM To: [email protected] Subject: [osg-users] osg::View NO_LIGHT bug? I cannot seem to turn off the light in osg::View. I can change it between headlight and sky light, but when I try NO_LIGHT, I still get the headlight. _viewer->getCamera()->getView()->setLightingMode(osg::View::SKY_LIGHT); //works _viewer->getCamera()->getView()->setLightingMode(osg::View::HEADLIGHT); //works _viewer->getCamera()->getView()->setLightingMode(osg::View::NO_LIGHT); //still get headlight How can I turn off this default light? How is it related to the osg::Lights in the scene? I noticed when I add an osg::Light, then the headlight is overridden. How can I change the light parameters of the SKY_LIGHT or HEADLIGHT? I am using osg version 2.6. Thanks, -Ben
_______________________________________________ osg-users mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

