Re: [osg-users] getting userData or accumulated Uniform in nodevisitor

2021-02-02 Thread Werner Modenbach
Hi Robert,

many thanks for your answers and support. I'm far from reclaiming something.
So as I understand your explanation the information I expected during cull 
trversal is just not there.
So I'll look for another solution.

Thanks again

- Werner -

Am 02.02.2021 um 13:59 schrieb Robert Osfield:
> On Tue, 2 Feb 2021 at 10:38, Werner Modenbach 
> mailto:werner.modenb...@modenbach-ac.de>> 
> wrote:
>
> Hi Robert,
>
>
> Replying to osg-users list so that others can chip in with insights or learn 
> from the discussion.
>  
>
> I think I'm close to getting the solution.
> Unfortunately the CullStack doesn't handle any StateSets.
> I also do not really understand what a StateGraph is.
> I just guess, calling /CullVisitor->getCurrentStateGraph()->_stateSet 
> /gives me the accumulated StateSet.
> Am I right?
> Or is the accumulation of StateSets somewhere in CullVisitor->getState()? 
> But there is no method for just querying a uniform in State.
> Most of the classes have only push(), pop() or apply() methods. No query 
> methods.
>
>
> I have touched this code for years so you are probably more familiar with it 
> now than I. 
>
> From the top of my head the CullVisitor doesn't directly manage individual 
> state components like Uniform, just the high level StateSet.  The results of 
> the Cull traversal are
> passed on to the a osgUitl::StateGraph that remains at the StateSet levels, 
> it's only once this StateGraph is applied during the draw traversal does the 
> OSG's draw traversal
> behind to handle the individual components of state like models, attributes 
> and modes, and this is done via osg::State.
>
> What you are wanting to do is out of the ordinary, it's not something the OSG 
> was specifically designed to do.  Whether your approach is really necessary 
> or the best approach I
> don't know - I'm just trying to answer questions.  When you do go beyond what 
> the OSG was originally envisaged to do you'll need to accept that you'll need 
> to dig into code and
> figure stuff out, I can only help you so much.
>
> Robert.
>
>
>
>  
>
> ___
> 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


Re: [osg-users] getting userData or accumulated Uniform in nodevisitor

2021-02-02 Thread Robert Osfield
On Tue, 2 Feb 2021 at 10:38, Werner Modenbach <
werner.modenb...@modenbach-ac.de> wrote:

> Hi Robert,
>

Replying to osg-users list so that others can chip in with insights or
learn from the discussion.


> I think I'm close to getting the solution.
> Unfortunately the CullStack doesn't handle any StateSets.
> I also do not really understand what a StateGraph is.
> I just guess, calling *CullVisitor->getCurrentStateGraph()->_stateSet *gives
> me the accumulated StateSet.
> Am I right?
> Or is the accumulation of StateSets somewhere in CullVisitor->getState()?
> But there is no method for just querying a uniform in State.
> Most of the classes have only push(), pop() or apply() methods. No query
> methods.
>

I have touched this code for years so you are probably more familiar with
it now than I.

>From the top of my head the CullVisitor doesn't directly manage individual
state components like Uniform, just the high level StateSet.  The results
of the Cull traversal are passed on to the a osgUitl::StateGraph that
remains at the StateSet levels, it's only once this StateGraph is applied
during the draw traversal does the OSG's draw traversal behind to handle
the individual components of state like models, attributes and modes, and
this is done via osg::State.

What you are wanting to do is out of the ordinary, it's not something the
OSG was specifically designed to do.  Whether your approach is really
necessary or the best approach I don't know - I'm just trying to answer
questions.  When you do go beyond what the OSG was originally envisaged to
do you'll need to accept that you'll need to dig into code and figure stuff
out, I can only help you so much.

Robert.
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] getting userData or accumulated Uniform in nodevisitor

2021-02-01 Thread 杨光
ok i get it,i feel sorry for that

Robert Osfield  于2021年2月1日周一 下午6:45写道:

> On Mon, 1 Feb 2021 at 10:38, 杨光  wrote:
>
>> Hello, I’m sorry to ask you, I use shader on osgearth, the coloring
>> effect is unsatisfactory, and the coloring area will change with the
>> movement of the camera, can you give some hints on this question ?
>>
>
> If you have an unrelated question it's inappropriate to piggyback off
> another thread as it makes it harder for everyone to follow.  It'd be rude
> to interrupt someone else's conversation in real-life, online forum/mailing
> list as just the same. Please start your own thread for your question.
>
> For osgEarth related questions there is a dedicated community for it so
> it's likely to be the best place to ask questions about it there.
>
> Cheers,
> Robert.
>
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "OpenSceneGraph Users" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/osg-users/SlS_7SY0528/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> osg-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/osg-users/CAFN7Y%2BXoqf_pZNJ5fLB_KWSWUqsduJgbogdvMakw_mOJ76rC%2Bw%40mail.gmail.com
> 
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"OpenSceneGraph Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to osg-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/osg-users/CAN5EeD%3DHRo1aC2Jm8mhvpgOGYhVPaw_tDhxjFt6%3DAwox-RuUdA%40mail.gmail.com.
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] getting userData or accumulated Uniform in nodevisitor

2021-02-01 Thread Robert Osfield
On Mon, 1 Feb 2021 at 10:38, 杨光  wrote:

> Hello, I’m sorry to ask you, I use shader on osgearth, the coloring effect
> is unsatisfactory, and the coloring area will change with the movement of
> the camera, can you give some hints on this question ?
>

If you have an unrelated question it's inappropriate to piggyback off
another thread as it makes it harder for everyone to follow.  It'd be rude
to interrupt someone else's conversation in real-life, online forum/mailing
list as just the same. Please start your own thread for your question.

For osgEarth related questions there is a dedicated community for it so
it's likely to be the best place to ask questions about it there.

Cheers,
Robert.
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] getting userData or accumulated Uniform in nodevisitor

2021-02-01 Thread 杨光
Hello, I’m sorry to ask you, I use shader on osgearth, the coloring effect 
is unsatisfactory, and the coloring area will change with the movement of 
the camera, can you give some hints on this question ?

在2021年2月1日星期一 UTC+8 上午2:19:34 写道:

> Hi Werner,
>
> You'll need to override the Cull traversal behavior and get the StateSet 
> stack from the CullVisitor.  I don't recall the details off the top of my 
> head so you'll need to look at the osgUtil::CullVisitor and it's parent 
> class osg::CullStack for the tracking of state.
>
> Robert.
>

-- 
You received this message because you are subscribed to the Google Groups 
"OpenSceneGraph Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to osg-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/osg-users/2dbc8e41-4c35-4e12-8f3e-ae6e9d178bf5n%40googlegroups.com.
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] getting userData or accumulated Uniform in nodevisitor

2021-01-31 Thread Robert Osfield
Hi Werner,

You'll need to override the Cull traversal behavior and get the StateSet
stack from the CullVisitor.  I don't recall the details off the top of my
head so you'll need to look at the osgUtil::CullVisitor and it's parent
class osg::CullStack for the tracking of state.

Robert.
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org