<div dir="ltr"><div><div><div><div><div><div>Hi Bruce,<br><br></div>A quick look at the OSGWidget.cpp and it looks to me like the code is creating its own osg::Camera and assigning it to the view but this Camera never sets up global default state so OpenGL defaults will be used, depth testing is off by default in OpenGL, which in turn will give this problem. This is a bug in OSGWidget.cpp that needs fixing and passing on to the authors of the code.<br><br></div>What the code should do is either:<br><br></div> 1) Use the View's master Camera rather than replacing it with a locally created one, View's master Camera has a StateSet with the appropriate <br> global defaults applied. i.e.<br><br></div><div> osg::Camera* camera = view->getCamera() // replacing camera = new osg::Camera<br></div><div><br></div> 2) Assign a StateSet to the Camera, and set it's up with the appropriate global defaults for the 3D scene i.e.<br><br></div> camera->getOrCreateStateSet()->setGlobalDefaults(); // add around line 127<br><br></div>Robert.<br><div><div><div><div> <br></div></div></div></div></div><div class="gmail_extra"><br><div class="gmail_quote">On 24 August 2017 at 15:43, Bruce Clay <span dir="ltr"><<a href="mailto:bclay1297@gmail.com" target="_blank">bclay1297@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,<br>
<br>
The original source code related to this problem was downloaded from <a href="https://github.com/Submanifold/QtOSG" rel="noreferrer" target="_blank">https://github.com/<wbr>Submanifold/QtOSG</a>.<br>
<br>
The QtOSG class is similar in function to the osgQt distributed with OSG in function but it seems more "native" to OSG itself. That is I could see all of the normal OSG code. When I use the osgQt class I can display the model properly but I don't appear to get the same window capabilities.<br>
<br>
The good and bad images were attached as requested<br>
<span class=""><br>
Thank you!<br>
<br>
Cheers,<br>
Bruce<br>
<br>
------------------<br>
Read this topic online here:<br>
</span><a href="http://forum.openscenegraph.org/viewtopic.php?p=71523#71523" rel="noreferrer" target="_blank">http://forum.openscenegraph.<wbr>org/viewtopic.php?p=71523#<wbr>71523</a><br>
<br>
<br>
<br>
<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>