[osg-users] Complete darkness

Vincent Bourdier vincent.bourdier at gmail.com
Fri Feb 29 02:08:00 PST 2008


Maybe just a setnumlight(0)... to replace default light by yours.

Vincent

2008/2/29, Wojciech Lewandowski <lewandowski at ai.com.pl>:
>
> Sounds like default Light Model ambient.... Look at OpenGL docs for
> glLightModel & GL_LIGHT_MODEL_AMBIENT.
>
> Cheers,
> Wojtek
>
> ----- Original Message -----
> From: "Necdet Can Atesman" <c.atesman at gmx.net>
> To: <osg-users at lists.openscenegraph.org>
> Sent: Friday, February 29, 2008 1:10 AM
> Subject: [osg-users] Complete darkness
>
>
> > Hi folks,
> >
> > I am unable to create complete darkness in osg. I'm setting the only
> > light source to not emit anything, but the objects in my scene are still
> > visible, although very faintly. Is there something wrong with the code,
> > or is it just osg/opengl?
> >
> > osg::Light* light = new osg::Light();
> > light->setAmbient(osg::Vec4d(0.0f, 0.0f, 0.0f, 1.0f));
> > light->setDiffuse(osg::Vec4d(0.0f, 0.0f, 0.0f, 1.0f));
> > light->setSpecular(osg::Vec4d(0.0f, 0.0f, 0.0f, 1.0f));
> > osgView* view = new osg::View();
> > osgView->setLightingMode(osg::View::HEADLIGHT);
> > view->setLight(light);
> >
> > Thanks,
> > Necdet Can
> > _______________________________________________
> > osg-users mailing list
> > osg-users at lists.openscenegraph.org
> >
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
> _______________________________________________
> osg-users mailing list
> osg-users at lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20080229/fbb61e47/attachment.html 


More information about the osg-users mailing list