Hi Sebastian,

you are right.I can get renderInfo.getState() for the current state, was
wondering about the usage though. Let me try your suggestion and thanks!

Nick


On Tue, Aug 20, 2013 at 2:06 PM, 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
>
>
>


-- 
trajce nikolov nick
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to