Added support for --sky-light and headlight with local position at 0,0,0

This commit is contained in:
Robert Osfield 2007-07-11 14:16:02 +00:00
parent b93539ee09
commit 8779813837

View File

@ -698,6 +698,16 @@ int main(int argc, char** argv)
viewer.setSceneData( distortionNode );
}
while (arguments.read("--sky-light"))
{
viewer.setLightingMode(osg::View::SKY_LIGHT);
}
if (viewer.getLightingMode()==osg::View::HEADLIGHT)
{
viewer.getLight()->setPosition(osg::Vec4(0.0f,0.0f,0.0f,1.0f));
}
// load the nodes from the commandline arguments.
if (!viewer.getSceneData())