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

2016-06-06 Thread Robert Osfield
HI Nickolai, If you don't want the default global light then simple do: viewer.setLightingMode(osg::Viewer::NO_LIGHT); Rather than switching it to SKY_LIGHT! Robert. On 5 June 2016 at 22:44, Nickolai Medvedev wrote: > Well, we can deceive viewer if we make so: >

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

2016-06-05 Thread Julien Valentin
If you don't want any light in your scene You just have to setMode(GL_LIGHTING,OFF,OVERRIDE) on you root's stateset Hope it helps Ben Axelrod wrote: > I cannot seem to turn off the light in osg::View. I can change it between > headlight and sky light, but when I try NO_LIGHT, I still get the

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

2016-06-05 Thread Nickolai Medvedev
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);

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

2009-02-18 Thread Robert Osfield
Hi Ben, If there are modes in your scene graph that enable lighting then you'll get the default OpenGL lighting values. You don't say what effect you actually want to achieve so can't comment on what you should do in your scene graph, you'll need to provide more info. FYI, Viewer is a View, so

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

2009-02-17 Thread Ben Axelrod
I cannot seem to turn off the light in osg::View. I can change it between headlight and sky light, but when I try NO_LIGHT, I still get the headlight. _viewer-getCamera()-getView()-setLightingMode(osg::View::SKY_LIGHT); //works

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

2009-02-17 Thread Ben Axelrod
17, 2009 11:36 AM To: osg-users@lists.openscenegraph.org Subject: [osg-users] osg::View NO_LIGHT bug? I cannot seem to turn off the light in osg::View. I can change it between headlight and sky light, but when I try NO_LIGHT, I still get the headlight. _viewer-getCamera()-getView

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

2009-02-17 Thread Tomlinson, Gordon
From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Ben Axelrod Sent: Tuesday, February 17, 2009 3:09 PM To: OpenSceneGraph Users Subject: Re: [osg-users] osg::View NO_LIGHT bug? I still don't know why osg::View

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

2009-02-17 Thread David Spilling
Ben, osg::View's setLightingMode with NO_LIGHT as a parameter doesn't actually turn any lights off (just look at the source in osg/View.cpp). If the lightingMode is *not* NO_LIGHT, then it sets light 0 with the default 0.8 diffuse value etc. I presume this is by design, although I'm not sure why!

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

2009-02-17 Thread Steven Saunderson
- From: Ben Axelrod at 2009-02-18 07:09- I still dont know why osg::View::NO_LIGHT doesnt work, but to answer my own questions, to turn off the default light completely: { light-setAmbient(osg::Vec4(0,0,0,1)); light-setDiffuse(osg::Vec4(0,0,0,1));