[osg-users] ColorMask and depth information issue.

Robert Osfield robert.osfield at gmail.com
Thu Aug 13 11:05:44 PDT 2015


Hi Alessandro,

At this point I don't have any ideas as to what might be amiss. To resolve
it you'll need to step through a series of tests and investigations to
figure out what might be amiss.  The difference could be regression
introduced in OSG-3.4, but it also could be that OSG-3.4 is a little
stricter so that problems in the scene graph setup that were hidden before
are now exposed so you get the counter-intuitive situation that fixing the
OSG breaks a client app.

What happens if you don't apply the ColorMask?  If the objects appear then
you know there is some interaction there, if it doesn't then there is
something else amiss.

FYI. ColorMask header and ColorMask.cpp are identical between OSG-3.4 and
OSG-3.2, so this itself won't be the source of the discrepancy you are
seeing.

Another test you could try is to try your application with straight OpenGL
on a desktop.

Another thing you could look at is how the standard examples work on the
two versions.  Are they similar or different?

Robert.



On 13 August 2015 at 17:38, Alessandro Terenzi <a.terenzi at gmail.com> wrote:

> 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
>
>
>
>
>
> _______________________________________________
> osg-users mailing list
> osg-users at lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20150813/6044836c/attachment-0003.htm>


More information about the osg-users mailing list