<div dir="ltr"><div><div><div>Hi Alessandro,<br><br><br></div>The bm_102.osg isn't a valid .osg file, you have one too many brackets after the Material.  If you remove this extra bracket you can see the object properly.<br><br></div>I can only presume you've hand editing the files at somepoint and this has introduced the error.<br><br></div><div>I don't know if this error has anything to do with the wider problems you are seeing.<br></div><div><br></div>Robert.<br><div><div><br><br></div></div></div><div class="gmail_extra"><br><div class="gmail_quote">On 14 August 2015 at 09:45, Alessandro Terenzi <span dir="ltr"><<a href="mailto:a.terenzi@gmail.com" target="_blank">a.terenzi@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Thank you Robert.<br>
I will try to setup an example on a desktop computer.<br>
<br>
Just to add more to the topic, I tried to call osg::Camera::getOrCreateStateSet()->setGlobalDefaults(); but nothing changed. And here's how I setup my camera (that is not the one coming from the viewer):<br>
<br>
<br>
Code:<br>
foreground_camera = new osg::Camera;<br>
foreground_camera->getOrCreateStateSet()->setGlobalDefaults();<br>
foreground_camera->setViewport(new osg::Viewport(0, 0, captureWidth, captureHeight));<br>
foreground_camera->setReferenceFrame(osg::Transform::ABSOLUTE_RF);<br>
foreground_camera->setClearMask( GL_DEPTH_BUFFER_BIT );<br>
foreground_camera->setRenderOrder(osg::Camera::POST_RENDER, 2);<br>
foreground_camera->setComputeNearFarMode(osg::CullSettings::DO_NOT_COMPUTE_NEAR_FAR);<br>
foreground_camera->setCullingMode(osg::CullSettings::NO_CULLING);<br>
<br>
<br>
<br>
This camera is supposed to render objects on top of a video camera feed.<br>
<br>
I am attaching also 2 simple boxes (osgt) one is correctly hidden the other is not.<br>
<br>
Cheers,<br>
<span class="">Alessandro<br>
<br>
------------------<br>
Read this topic online here:<br>
</span><a href="http://forum.openscenegraph.org/viewtopic.php?p=64766#64766" rel="noreferrer" target="_blank">http://forum.openscenegraph.org/viewtopic.php?p=64766#64766</a><br>
<br>
<br>
<br>
<br>
Attachments:<br>
<a href="http://forum.openscenegraph.org//files/bnm_150.osg" rel="noreferrer" target="_blank">http://forum.openscenegraph.org//files/bnm_150.osg</a><br>
<a href="http://forum.openscenegraph.org//files/bm_102.osg" rel="noreferrer" target="_blank">http://forum.openscenegraph.org//files/bm_102.osg</a><br>
<div class="HOEnZb"><div class="h5"><br>
<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>
</div></div></blockquote></div><br></div>