Dear Farshid,
You can use the osg::ColorMask state attribute to prevent the object
from writing to the color buffer. I've used this technique in my
video-see-through apps.
Thanks. I tried it, but it didn't seem to work for me. The way I did it is
as follows (r is of type osg::Node*):
osg::StateSet* stateSet = r->getOrCreateStateSet();
osg::ColorMask* cm = new osg::ColorMask(false, false, false, false);
stateSet->setAttributeAndModes( cm, osg::StateAttribute::ON);
It seems to work fine for masking the bits off for each colour channel
separately. However, when I disable all the channels, the "phantom" object
does not appear to occlude objects behind it.
I also made sure that the depth test was enabled, but that didn't make any
difference to the results.
Any thoughts?
Cheers,
Simon
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org