Hi Robert, Thanks for the tip, I did not know StateSet::merge method. I will try this out.
Best Regards, Maciej Krol 2008/4/11, Robert Osfield <[EMAIL PROTECTED]>: > > Hi Maciej, > > osg::State is probably not the best way to accumulate state for general > CPU computation work as its totally geared around the rendering side. > > What you are better off doing is creating a stack of osg::StateSet that > you push/pop as you traverse the scene graph. When you encounter > nodes/drawables that have a StateSet then clone the topmost StateSet of the > stack and then do a StateSet::merge with the new one. > > I haven't actually implemented this myself before but this is at least how > I'd go about it. > > Robert. > > On Fri, Apr 11, 2008 at 10:22 AM, Maciej Krol <[EMAIL PROTECTED]> wrote: > > > Hi all, > > > > I am writing converter from fixed pipeline to glsl. I need to know exact > > state set of my drawables. For this purpose I have prepared node visitor > > that uses osg::State to accumulate node states. The visitor at the drawable > > uses osg::State::captureCurrentState to fetch accumulated state. The problem > > is that texture modes, texture attributes and uniforms are not copied. How > > can I access them? All required members of osg::State are protected and > > there is a lack of accessor methods. > > > > Best Regards, > > Maciej Krol > > > > _______________________________________________ > > osg-users mailing list > > osg-users@lists.openscenegraph.org > > > > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org > > > > > > _______________________________________________ > osg-users mailing list > osg-users@lists.openscenegraph.org > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org > >
_______________________________________________ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org