LIGHTING ON:
xxx->getOrCreateStateSet()->setMode(GL_LIGHTING,osg::StateAttribute::ON | 
osg::StateAttribute::OVERRIDE);

LIGHTING OFF:
xxx->getOrCreateStateSet()->setMode(GL_LIGHTING,osg::StateAttribute::OFF | 
osg::StateAttribute::OVERRIDE);

04.08.08, 16:18, "Robert Osfield" <[EMAIL PROTECTED]>:

> Hi Sam,
> On Mon, Aug 4, 2008 at 10:56 AM, Sam <[EMAIL PROTECTED]> wrote:
> > I hope there will be a name now, otherwise call me Sam :)
> Yep, name came through thanks.  Named posts help keep an informal and
> friendly atmosphere on the list ;-)
> > The funny thing is that disabling light worked before on other models, while
> > assigning emission color, the objects have color, no matter if lighting is
> > on or off (actually it is not full white, but I am on it)
> The OpenGL material/lighting behaviour can be a bit perplexing, I'd
> recommend reading well up on OpenGL materials and lighting.
> > The other problem was solved by using the StatsVisitor (which I wanted to
> > avoid). Traversing nodes clearing states and setting color arrays to 0
> > helped.
> If you disable he glColorMaterial contribution off then the vertex
> colour arrays won't have any effect, in the OSG you can do this via:
>    material->setColorMode(osg::Material::OFF);
> Robert.
> _______________________________________________
> osg-users mailing list
> [email protected]
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

-- 
Яндекс.Открытки. Дорого внимание http://cards.yandex.ru/
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to