<div dir="ltr">Hi all,<div>this is a very old oddity - stats look a bit weird on a empty scene. <br><div>the actual problem is the osg default for the blend function is never set if the main camera renders absolutely nothing, so the opengl default blendfunc ( GL_ONE, GL_ZERO) is still active.</div><div>To fix this I added to </div><div>src\osgViewer\StatsHandler.cpp </div><div>in the function setUpScene:</div><div><div> stateset->setGlobalDefaults(); // add default blend function</div><div>before the line</div><div> stateset->setMode(GL_LIGHTING,osg::StateAttribute::OFF);</div></div><div><br></div><div>Regards, Laurens.</div></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Dec 15, 2016 at 8:47 PM, Riccardo Corsi <span dir="ltr"><<a href="mailto:riccardo.corsi@kairos3d.it" target="_blank">riccardo.corsi@kairos3d.it</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"><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">please find attached the hacked viewer which starts also without any loaded model.</div><div class="gmail_default" style="font-family:tahoma,sans-serif"><br></div><div class="gmail_default" style="font-family:tahoma,sans-serif">Here are the details of my setup (even though I've noticed this issue since several osg versions now)</div><div class="gmail_default" style="font-family:tahoma,sans-serif">- Win10 / VisualStudio 2013</div><div class="gmail_default" style="font-family:tahoma,sans-serif">- nVidia GTX970 with recent drivers</div><div class="gmail_default" style="font-family:tahoma,sans-serif">- osg 3.5.3</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">Riccardo</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><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Dec 15, 2016 at 8:16 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">Hi Riccardo,<br>
<br>
Could you post your modified osgviewer so we can attempt to reduce things.<br>
<br>
Also please provide details on the OS platform, OSG version, drivers,<br>
hardware as these are all likely to affect the result.<br>
<br>
Robert.<br>
<div><div class="m_5922670263473182025h5"><br>
On 15 December 2016 at 18:44, Riccardo Corsi <<a href="mailto:riccardo.corsi@kairos3d.it" target="_blank">riccardo.corsi@kairos3d.it</a>> wrote:<br>
> Hi all,<br>
><br>
> I've found out that when I show the stats handler without having set any<br>
> data on the viewer,<br>
> its rendering is corrupted (fonts, transparency) - see attached screenshot,<br>
> I simply forced osgViewer to run without any loaded model.<br>
><br>
> The Stats are rendered without being attached to the scene or as a slave,<br>
> the stats camera instead is directly added to the first available graphics<br>
> context,<br>
> so I'm afraid some initialization is missing.<br>
><br>
> I have the same problem with another GUI tool I'm rendering with the same<br>
> technique.<br>
> Can anybody provide an hint?<br>
> Thank you,<br>
> Riccardo<br>
><br>
><br>
</div></div>> ______________________________<wbr>_________________<br>
> osg-users mailing list<br>
> <a href="mailto:osg-users@lists.openscenegraph.org" target="_blank">osg-users@lists.openscenegraph<wbr>.org</a><br>
> <a href="http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org" rel="noreferrer" target="_blank">http://lists.openscenegraph.or<wbr>g/listinfo.cgi/osg-users-opens<wbr>cenegraph.org</a><br>
><br>
______________________________<wbr>_________________<br>
osg-users mailing list<br>
<a href="mailto:osg-users@lists.openscenegraph.org" target="_blank">osg-users@lists.openscenegraph<wbr>.org</a><br>
<a href="http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org" rel="noreferrer" target="_blank">http://lists.openscenegraph.or<wbr>g/listinfo.cgi/osg-users-opens<wbr>cenegraph.org</a><br>
</blockquote></div><br></div>
</div></div><br>______________________________<wbr>_________________<br>
osg-users mailing list<br>
<a href="mailto:osg-users@lists.openscenegraph.org">osg-users@lists.<wbr>openscenegraph.org</a><br>
<a href="http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org" rel="noreferrer" target="_blank">http://lists.openscenegraph.<wbr>org/listinfo.cgi/osg-users-<wbr>openscenegraph.org</a><br>
<br></blockquote></div><br></div>