Hi Frank,

Could be something entirely different but have you tried setting empty
program (= activating fixed pipeline) with default ON attribute ?

ie:
   ss->setAttribute(new osg::Program);

We were using that approach to turn off Shaders in LightPoints.

Cheers,
Wojtek Lewandowski


2013/2/13 Frank Kane <[email protected]>

> Hi gang,
>
> I've got a setup where I have an osg::Program attached near the top of my
> scene graph to do lighting effects. It works great, except that
> LightPointNodes don't show up when it's active.
>
> I tried intercepting the LightPointNodes in the graph inside a cull
> visitor, and disabling the shader on it - roughly like this:
>
> osg::ref_ptr<osg::StateSet> ss = lightPointNode.getStateSet();
> if (ss && ss.valid()) {
>     ss->setAttributeAndModes(myProgram.get(), osg::StateAttribute::OFF);
> }
>
> But, this seems to have no effect (I checked - the call to
> setAttributeAndModes is being reached). Looking at the
> osgSim::LightPointNode source, it looks like it's doing tricks with a
> singleton state set shared amongst them all, its own render bin, and
> manipulating its own state set graph. I don't know if that's wiping out my
> state somehow, or if I'm just Doing It Wrong.
>
> Has anyone else ever encountered trouble using shaders in conjuction with
> LightPointNodes? Any advice if so?
>
> Thanks!
> Frank
>
> Frank Kane
> Founder
> Sundog Software, LLC
>
> http://www.sundog-soft.com/
>
> http://www.linkedin.com/pub/frank-kane/17/434/764
>
> _______________________________________________
> osg-users mailing list
> [email protected]
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
>
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to