<div dir="ltr"><div class="gmail_default" style="font-family:tahoma,sans-serif">Hi Robert,</div><div class="gmail_default" style="font-family:tahoma,sans-serif"><br></div><div class="gmail_default" style="font-family:tahoma,sans-serif">yes for the flickering I refer to the stats on screen.</div><div class="gmail_default" style="font-family:tahoma,sans-serif"><br></div><div class="gmail_default" style="font-family:tahoma,sans-serif">Here's what I've noticed:</div><div class="gmail_default" style="font-family:tahoma,sans-serif">- I place my stats update between event and update traversal</div><div class="gmail_default" style="font-family:tahoma,sans-serif">- the flickering appears when I use threading models other than singleThreaded (typically the default DrawThreadPerContext one) </div><div class="gmail_default" style="font-family:tahoma,sans-serif">AND the cull+draw time hits the frame duration time (around 16ms at 60Hz). </div><div class="gmail_default" style="font-family:tahoma,sans-serif"><br></div><div class="gmail_default" style="font-family:tahoma,sans-serif">Like if the onscreen stats were "dropping" when the application doesn't keep 60Hz.</div><div class="gmail_default" style="font-family:tahoma,sans-serif">I don't tweak the render code in any way, just a regular osg loop with some custom code in between osg calls.</div><div class="gmail_default" style="font-family:tahoma,sans-serif"><br></div><div class="gmail_default" style="font-family:tahoma,sans-serif"><br></div><div class="gmail_default" style="font-family:tahoma,sans-serif">Side note: </div><div class="gmail_default" style="font-family:tahoma,sans-serif">the draw time shown in the stats almost always fills up the frame time when using threading scheme other than SingleThreaded,</div><div class="gmail_default" style="font-family:tahoma,sans-serif">even if the drawing thread has little to do.</div><div class="gmail_default" style="font-family:tahoma,sans-serif">SingleThreaded scheme does not suffer the same issue (see attached screenshot, simple osgviewer).</div><div class="gmail_default" style="font-family:tahoma,sans-serif">I presume this is due to OS + driver combination, <br></div><div class="gmail_default" style="font-family:tahoma,sans-serif">I'm on Win7 64bits + nVidia 970 GTX.</div><div class="gmail_default" style="font-family:tahoma,sans-serif"><br></div><div class="gmail_default" style="font-family:tahoma,sans-serif">Thank you,</div><div class="gmail_default" style="font-family:tahoma,sans-serif">Ricky</div><div class="gmail_default" style="font-family:tahoma,sans-serif"><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Nov 18, 2015 at 4:46 PM, Robert Osfield <span dir="ltr"><<a href="mailto:robert.osfield@gmail.com" target="_blank">robert.osfield@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><span class="">On 18 November 2015 at 15:14, Riccardo Corsi <span dir="ltr"><<a href="mailto:riccardo.corsi@kairos3d.it" target="_blank">riccardo.corsi@kairos3d.it</a>></span> wrote:<br></span><div class="gmail_extra"><div class="gmail_quote"><span class=""><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div style="font-family:tahoma,sans-serif">Hi all,</div><div style="font-family:tahoma,sans-serif"><br></div><div style="font-family:tahoma,sans-serif">in my project I'm using some custom statistics as in the osguserstats.cpp example. </div><div style="font-family:tahoma,sans-serif"><br></div><div style="font-family:tahoma,sans-serif">In the example, user stats are updated every frame between advance() and eventTraversal().</div><div style="font-family:tahoma,sans-serif"><br></div><div style="font-family:tahoma,sans-serif">In my case, I was trying to update my stats between eventTRaversal() and updateTraversal(), where I already execute some other code.</div><div style="font-family:tahoma,sans-serif"><br></div><div style="font-family:tahoma,sans-serif">But by doing so, stats do not always show up correctly - sometimes they "flicker" and do not show. </div><div style="font-family:tahoma,sans-serif">Is the one used in the example the only one safe place to update user stats?</div></div></blockquote><div><br></div></span><div>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".<br><br></div><div>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?<span class="HOEnZb"><font color="#888888"><br><br></font></span></div><span class="HOEnZb"><font color="#888888"><div>Robert.<br></div><div> </div><div><br> </div></font></span></div></div></div>
<br>_______________________________________________<br>
osg-users mailing list<br>
<a href="mailto:osg-users@lists.openscenegraph.org">osg-users@lists.openscenegraph.org</a><br>
<a href="http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org" rel="noreferrer" target="_blank">http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org</a><br>
<br></blockquote></div><br></div>