[osg-users] user stats update

Robert Osfield robert.osfield at gmail.com
Wed Nov 18 07:46:57 PST 2015


On 18 November 2015 at 15:14, Riccardo Corsi <riccardo.corsi at kairos3d.it>
wrote:

> Hi all,
>
> in my project I'm using some custom statistics as in the osguserstats.cpp
> example.
>
> In the example, user stats are updated every frame between advance() and
> eventTraversal().
>
> In my case, I was trying to update my stats between eventTRaversal() and
> updateTraversal(), where I already execute some other code.
>
> But by doing so, stats do not always show up correctly - sometimes they
> "flicker" and do not show.
> Is the one used in the example the only one safe place to update user
> stats?
>

The osg::Stats object that is used for recording stats uses a mutex
internally to make sure that setting and getting stats is thread safe.
osg::Stats itself is just a container object though it doesn't do any
rendering so itself can't "flicker".

When you say flicker I presume we are talking about onscreen stats.  I
haven't seen reports of them flickering before.  Perhaps your usage model
trips up the rendering code in some way.  What threading model are you
running the viewer with?  Can you modify an OSG example to reproduce the
issue?

Robert.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20151118/a7e99573/attachment-0003.htm>


More information about the osg-users mailing list