Hi All,
I am trying to create a function that sets a world
light ie
setWorldLightIntensity(float fIntensity)
where an argument of 1.0 results in a midday scene and
0.0 results in a midnight scene.
I am using the default SKY_LIGHT in osgProducer and
attempting to modify it to affect my scene, but I am
confused my the multiple calls to new osg::Light that
exist in the osgProducer code.
The first call is at line 338 of Viewer.cpp
386: setSceneDecorator(lightsource);
387: {
388: osg::Light* light = new osg::Light; <----
389: lightsource->setLight(light);
and the second call is at line 127 of SceneView.cpp
134: if ((options & HEADLIGHT) || (options &
SKY_LIGHT))
135: {
136: _lightingMode=(options&HEADLIGHT) ? HEADLIGHT
: SKY_LIGHT;
137: _light = new osg::Light;
138: _light->setLightNum(0);
Before I delve too much into getting my world light to
work, I thought I should ask, does anyone know why
there are two instances of a light created when I
call:
pViewer->setUpViewer(osgProducer::Viewer::ViewerOptions::ESCAPE_SETS_DONE
| osgProducer::Viewer::ViewerOptions::SKY_LIGHT_SOURCE
);
Cheers,
Graham Towse
[EMAIL PROTECTED]
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
_______________________________________________
osg-users mailing list
[email protected]
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/