[osg-users] ColorMask and depth information issue.

Alessandro Terenzi a.terenzi at gmail.com
Thu Aug 13 09:38:10 PDT 2015


Hi,
I am having a problem related somehow to osg::ColorMask ... in order make an object invisible while still taking it's depth information into account I use these instructions:


Code:
    
osg::ref_ptr< osg::ColorMask > mask = new osg::ColorMask(false, false, false, false);
my_model->getOrCreateStateSet()->setAttributeAndModes(mask.get(), osg::StateAttribute::ON | osg::StateAttribute::OVERRIDE)




This used to work fine with OSG version 3.2.1 but I've tried using OSG 3.4.0 (stable release) and now the object is still not rendered but also the depth information seems to be ignored because other objects that are supposed to be behind that 'invisible' objects are not hidden by it anymore.

I'm using GLES1 profile on iOS. Tried to apply the color mask on a model loaded from FBX or OBJ.

Any suggestion?

Thanks.
Alessandro

------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=64756#64756








More information about the osg-users mailing list