[osg-users] osg::View NO_LIGHT bug?

Nickolai Medvedev raizel.dev at yandex.ru
Sun Jun 5 14:44:32 PDT 2016


Well, we can deceive viewer if we make so:


Code:
viewer.getLight()->setAmbient(osg::Vec4(0.0,0.0,0.0,1.0));
viewer.getLight()->setPosition(osg::Vec4(0.0,0.0,0.0,1.0));
viewer.getLight()->setDiffuse(osg::Vec4(0.0,0.0,0.0,1.0));
viewer.getLight()->setConstantAttenuation(0.003);
viewer.getLight()->setLinearAttenuation(0.1);
viewer.getLight()->setQuadraticAttenuation(0.1);
viewer.getLight()->setName("global_light");
viewer.getLight()->setLightNum(0);

viewer.setLightingMode(osg::View::SKY_LIGHT);



The light source still be exist, but will be invisible.

Cheers,
Nickolai

------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=67426#67426








More information about the osg-users mailing list