Modified Veiewer.cpp so that when toggling the light with 'l' the light can

be overrided to off and overrided to on, previoulsy it only overrided to off.
This commit is contained in:
Robert Osfield
2001-10-16 10:03:19 +00:00
parent c0b0ab5d62
commit 659f7ad1ab

View File

@@ -1108,7 +1108,7 @@ void Viewer::keyboard(unsigned char key, int x, int y)
case 'l' :
lighting = 1 - lighting ;
if( lighting )
sceneView->getGlobalState()->setMode(GL_LIGHTING,osg::StateAttribute::ON);
sceneView->getGlobalState()->setMode(GL_LIGHTING,osg::StateAttribute::OVERRIDE_ON);
else
sceneView->getGlobalState()->setMode(GL_LIGHTING,osg::StateAttribute::OVERRIDE_OFF);
break;