Hi Frank,
Did you set up your top-level program with
ss->setAttributeAndModes(topLevelProgram, osg::StateAttribute::ON |
osg::StateAttribute::OVERRIDE); ?
Also, I don't really understand if you are trying to render them with
fixed function pipeline or your own custom shader.
For fixed function you could simply use set up an empty program (
ss->setAttributeAndModes(new osg::Program, osg::StateAttribute::ON
osg::StateAttribute::PROTECTED);
Same procedure for the custom shader.
I use LightPoints without problems in my forward passes with a custom
shader that uses vertex-color and a texture.
cheers
Sebastian
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