Hi,

Still me and my rendering problems :

I just need to set a node to be always rendered (or not).
It needs to not depend on the Zbuffer/culling.

Maybe I am confuse, but I have tried this :

*osg::ref_ptr<osg::StateSet> state = node->getOrCreateStateSet();*
> *        state->setMode(GL_CULL_FACE, osg::StateAttribute::ON);*
> *        osg::ref_ptr<osg::Depth> depth;*
> *        if(set){*
> *            depth = new osg::Depth(osg::Depth::ALWAYS, 0.0, 1.0);*
> *            state->setMode(GL_CULL_FACE, osg::StateAttribute::OFF);*
> *            node->setCullingActive(false);*
> *        }else{*
> *            depth = new osg::Depth(osg::Depth::LEQUAL, 0.0, 1.0);*
> *            state->setMode(GL_CULL_FACE, osg::StateAttribute::ON);*
> *            node->setCullingActive(true);*
> *        }*
> *            *
> *        state->setAttributeAndModes(depth.get(),
> osg::StateAttribute::ON);*


Nothing changes at the screen...

If I put a node always rendered, is there some "limits" to that ? (node will
be culled if frustum far plane cut it... or anything similar )
if not, there is a real mistake is my code... and if it is right... that
will complicate my work :-(

Thanks.

Regards,
   Vincent.
_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to