[osg-users] ColorMask and depth information issue.

Robert Osfield robert.osfield at gmail.com
Fri Aug 14 00:59:53 PDT 2015

Hi Alessandro,

On 14 August 2015 at 08:43, Alessandro Terenzi <a.terenzi at gmail.com> wrote:

> Hi Robert,
> so far I can say that if I do not apply the ColorMask then the object is
> rendered correctly.
> Also, there is one specific geometry that actually gets hidden by the
> object the ColorMask is applied to, whereas all other geometries appear on
> top of that object. Apparently the only difference among those geometries
> is that the first has an opacity map applied while the others do not.

Unfortunately, without an example that illustrates the problem first hand
there really isn't much I and other members in the community can help
with.  In principle there should be no reason why doing what you are doing
shouldn't work with OSG-3.4.0, ColorMask is identical, so there is
something else in you apllication/scenegraph/OSG that is introducing the
problem, but there isn't any way for us to know what it might be.

I would recommend trying out your application on a desktop system with the
GLES1 profile enabled, and just vanilla OpenGL (default CMAke build), this
will give you at least a sanity test to see broadly where the problem might

The only other thing that springs to mind is that in the previous release
transition we fixed a bug in SceneView that meant that global state was
applied correctly rather than discarding it and replacing it with
defaults.  This change didn't affect most users applications that use the
OSG in standard ways, addressed a bug that prevent proper working
behaviours for others and for some who used the OSG in a slightly different
way than standard found that their applications were relying upon this
overriding of state but when it was removed the application behaved

The different usage was down to users creating their own osg::Camera and
appyling this to be the View(er)'s master Camera, replacing the original
one that had been set up with the appropriate global defaults.  The fix for
these users was to either just reuse the Camera attached to the View(er) or
call osg::Camera::getOrCreateStateSet()->setGlobalDefaults();

This was an example where a fix to the OSG broke end users applications
that were relying upon a bug to work correctly.

In your case I would have thought this particular issue isn't the problem,
but you never know.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20150814/2285364a/attachment-0003.htm>

More information about the osg-users mailing list