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