Hi Franco,

Posting screenshots is fine, and exactly the thing to do with these types
of problems.

It's not possible to diagnose the exact problem you are seeing with
rendering under OSG-3.6.5.  Broadly it looks like a depth test issue.

I don't know if this is relevant, but will mention it as some others have
been caught out by it. One of the bug fixes in the OSG-3.x series was to
fix an override of the osg::Camera settings that was causing applications
settings to be lost.  The fix had the side effect of revealing missing
settings, in essence it was a bug A that hide a bug B that only occurred
with certain usage models.

So bug A has been fixed and bug B usage case is an application creates a
viewer osg::Camera, sets up a graphics context, then just directly assigns
it to the viewer without setting any global state that is required for top
level osg::Camera.  The state not set includes GL_DEPTH_TEST - which is
where there "might" be an overlap with the problem you see with your
application.

Normal OSG usage where you use the Viewer Camera's that are assigned by
default also call StateSet::setGlobalDefaults() on this StateSet, so you
never see a problem.  All the OSG examples provided in the OpenSceneGraph
distribution do this.

However, the problem usage cause was something that was done in early osgQt
based examples - they created a local osg::Camera assigned to the viewer
and never called StateSet::setGlobalDefaults() on the osg::Camera's
StateSet.   These examples used to work fine, even with this ill defined
state because of Bug A.  If you copied one of these examples then you'll
inherit this bug B usage case.

If this is the case then can either:

    1) Just use the viewer(views) Camera via Viewer/View::getCamera() to
get the Camera to assign the GraphicsContext to, so utilize the default
settings.
    2) Call:  camera->getOrCreateStateSet()->setGlobalDefaults() on the
locally created Camera before it's assigned to the View(er).

There was a lot of discussion about this problem usage case and the
solution when bug A was fixed and bug B revealed, but that's quite a few
years ago now - had your software been updated more regularly it's likely
you'll have seen discussions.

Cheers,
Robert.

-- 
You received this message because you are subscribed to the Google Groups 
"OpenSceneGraph Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to osg-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/osg-users/mailman.14329.1599466370.3538.osg-users-openscenegraph.org%40lists.openscenegraph.org.
_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

-- 
You received this message because you are subscribed to the Google Groups 
"OpenSceneGraph Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to osg-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/osg-users/mailman.14329.1599466370.3538.osg-users-openscenegraph.org%40lists.openscenegraph.org.

Reply via email to