Hi Lucie, you can add the node you want to draw last under new camera,and set the render order to big number (see Camera::setRenderOrder). You would then need to sync the new camera matrices with the main camera (probably via update callback). This is how I did it and it works
-Nick On Fri, Oct 8, 2010 at 7:36 PM, Paul Martz <[email protected]> wrote: > It looks like you need to turn on backface culling for the sphere. > > But if you're going to draw non-convex objects, then turning off depth > testing won't work, and instead you'll need to leave it enabled and clear > the depth buffer before you draw the objects that must always be in front. > For this you'll want to look at using nested Camera nodes. Take a look at > osghud. > -Paul > > > > On 10/8/2010 6:36 AM, lucie lemonnier wrote: > >> Hi, >> >> I put this line of code for render my model last : >> >> mModel = osgDB::readNodeFile(mFileToLoad); >> osg::StateSet* state = mModel->getOrCreateStateSet(); >> state->setMode(GL_DEPTH_TEST,osg::StateAttribute::OFF); >> state->setRenderBinDetails(20,"Render_Bin"); >> >> But I get a odd render (see attachment). >> I am trying to put the sphere over the plane. >> Did I miss something in my code? >> >> Thank you! >> >> Cheers, >> lucie >> >> ------------------ >> Read this topic online here: >> http://forum.openscenegraph.org/viewtopic.php?p=32559#32559 >> >> >> >> >> Attachments: >> http://forum.openscenegraph.org//files/render_172.jpg >> >> >> _______________________________________________ >> osg-users mailing list >> [email protected] >> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org >> >> >> > > -- > -Paul Martz Skew Matrix Software > http://www.skew-matrix.com/ > > _______________________________________________ > osg-users mailing list > [email protected] > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org >
_______________________________________________ osg-users mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

