HI Anish, Changing state during cull isn't ideal as it limits the type of scene graph usage you can go for - running multiple cull threads will cause problems. Changing names of uniforms has to be matched to the programs that you are using and shouldn't be changed once a uniform has been created. Whether any of these are an issue for you I can't say, too much is unkown to me.
Robert. On 23 October 2012 10:39, Anish Thomas <[email protected]> wrote: > Hi Robert, > > I did try that and the final rendering was messed up. The shader uniform > that controls the color was changed in each view's cull traversal like so: > > osgUtil::CullVisitor* cv = static_cast<osgUtil::CullVisitor*>(&nv); > StateSet* ss = cv->getCurrentCamera()->getOrCreateStateSet(); > Uniform* uColor = ss->getOrCreateUniform("u_colorStr", > Uniform::FLOAT_VEC4); > > And the colors so applied didn't affect the rendered geometry. I changed > the uniform's name from something common like "u_color" to something unique > like "u_colorStr" and the end result wasn't different. > > Any ideas? > > Cheers, > Anish > > ------------------ > Read this topic online here: > http://forum.openscenegraph.org/viewtopic.php?p=50730#50730 > > > > > > _______________________________________________ > 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

