Hi Sebartian, A default constructed StateSet is empty, so pushing it on the osg::State won't do anything at all. Also StateSet::pushStateSet() never applies any State, it just pushes a StateSet on the osg::State stack, the overall current state will applied once State::apply() is called.
Robert. On 20 August 2013 12:06, Sebastian Messerschmidt < [email protected]> wrote: > Hi Nick, > > > void Drawable::drawImplementation(osg::RenderInfo& renderInfo) const > { > osg::ref_ptr<osg::StateSet> standard_state(new osg::StateSet); > renderInfo.getState()->pushStateSet(standard_state); > perform CustomRendering(); > renderInfo.getState()->popStateSet(standard_state); > } > > This will replace the state with the default state. > I guess you can get the current state from the renderInfo as well. > > cheers > Sebastian > > Hi Community, > > I have a custom rendering with GL calls and I want to wrap them in > push/pop StateSet (and everything). I see in osg::State all the push/pop > (like pushUniformList) methods are not accessible. Any hint how to do this? > > Here is what is something like I need: > void Drawable::drawImplementation(osg::RenderInfo& renderInfo) const > { > pushEverything() > doCustomGLRendering(); > popEverything() > } > > Thanks a bunch! > > Nick > > > -- > trajce nikolov nick > > > _______________________________________________ > osg-users mailing > [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 > >
_______________________________________________ osg-users mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

