Hi Alessandro,
stateset->setAttribute(new osg::ColorMask(false, false, false, false));
Robert.
On 4/6/07, alessandro terenzi <[EMAIL PROTECTED]> wrote:
What is the osg way to achive the same effect as the following OpenGL code?
glColorMask(GL_FALSE, GL_FALSE, GL_FALSE, GL_FALSE);
...actually, I'd like to make an object invisible though I'd like to keep
testing it against its depth information. So I thought that this would work:
osg::ref_ptr<osg::Node> objectNode;
objectNode = osgDB::readNodeFile(sceneFileName);
objectNode->getOrCreateStateSet()->setMode(osg::StateAttribute::COLORMASK,
osg::StateAttribute::OFF);
objectNode->getOrCreateStateSet()->setMode(osg::StateAttribute::DEPTH,
osg::StateAttribute::ON);
but the object is still visible. What is the problem?
Thanks.
Alessandro
_______________________________________________
osg-users mailing list
[email protected]
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/
_______________________________________________
osg-users mailing list
[email protected]
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/