So Robert, what is the answer?

Nick


On Tue, Aug 20, 2013 at 2:52 PM, Robert Osfield <robert.osfi...@gmail.com>wrote:

> 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 <
> sebastian.messerschm...@gmx.de> 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 
>> listosg-users@lists.openscenegraph.orghttp://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
>
>


-- 
trajce nikolov nick
_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to