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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user